The problem is that the team that made the trade really didn't have enough starting pitching, and by trading Sale they had less.
They only signed Giolito, Giolito got injured and they didn't replace him.
It's not so much that trading Sale is a head-scratcher, it was their overall approach to the starting pitching depth and lack thereof that's a head-scratcher.