They gave up a 4th in order to get a future 2nd, a current 6th, and take on salary cap.
The brilliance is that Osweiler has more value now that his dead money cap hit has already been paid by the Texans. Despite the reports that the Browns might simply cut him, I believe there is language in the CBA that does not allow teams to trade cap space (which this trade would be if Osweiler is cut).