On the Origin of Switchbacks Observed in the Solar Wind