What is the purpose of this item next to the cockpit window on the B737?
That protrusion makes it so that the pilot can only grasp, and activate, the handle by sliding his hand in to it from behind - which requires a deliberate action, rather than by accidentally resting one's hand on it from above. Since the window opening inadvertently is undesirable, it makes sense to block off the most likely means on unintentionally grabbing the handle.

It also provides a visual reference for the handle being in the locked closed position... if the handle is aligned with the fairing, it's locked; if not then it isn't.