Graham Moore said this quote

Watson is a cheap, efficient little sod of a literary device. Holmes doesn't need him to solve crimes any more than he needs a ten-stone ankle weight. The audience, Arthur. The audience needs Watson as an intermediary, so that Holmes's thoughts might be forever kept just out of reach. If you told stories from Holmes's perspective, everyone would know what the bleeding genius was thinking the whole time. They'd have the culprit fingered on page one.