Why can a square wave (or digital signal) be transmitted directly through wired cable but not wireless?
Due to the sharp edges, a square wave has a wide spectrum with lots of harmonics.

You could send that over the air with an antenna, but:
1- Signal shape will be distorted at the receiver due to limited bandwidth
2- It will use a lot more bandwidth than it needs to. For radio transmission you want to use as little bandwidth as you can, and not emit any energy at frequencies you don't use, to leave other frequencies available for other users, other channels, etc. So it would have terrible spectrum utilization. This is why digital signals are excellent sources of electromagnetic interference and noise, and a poor way to make an actual useful transmitter. So, pretty good if you want to make a wideband radio jammer, but not an actual transmitter.
3- It would have very poor SNR at the receiver
4- Unlike cables, radio doesn't go down to DC, so if the digital data doesn't contain the same amounts of zeros and ones, the result would be shifted
That's why a much better choice is to use a modulation and encoding suited for radio transmission. A simple encoding would be AM-modulating a carrier, for example.