Because using them causes Very Bad Things(tm) to happen
All the other banned weapons have this one trait. Chemical warfare is banned because it is indiscriminate, causes mass death, even on both sides, can't be protected against and destroys everything it touches.
Nuclear weapons are the same plus extra world ending sprinkles on top.
Logically it makes no sense to ban the use of aircraft to sink ships if ships can also sink ships. Both result in a sunk ship. The main difference between aircraft and other ships is where they operate : the sky.
Ships also operate on the open ocean, where as other forms of warfare happen on land. 347
Thus for a very specific treaty like this, you need something bad to happen when aircraft operate on the open ocean.
For the time period you have mentioned, aircraft were not yet capable of high altitude warfare with naval ships, they needed to be fairly low to hit them with anything. So we could limit this to low altitude aircraft over the open ocean, so that passenger aircraft and air to air combat is still viable.
For an example, we could imagine a very populous migratory bird that traverses the open ocean continuously and goes to the continental mainlands around the world at certain times for breeding or whatever. They are highly tuned to see objects at their flying altitude and follow them in big chains of migrating birds. When aircraft fly near these altitudes the birds become confused and huge swathes of them die from going off course and never reaching land.
The impact of this happening after the first few occurrences begins to show itself as significant portions of the ecosystems worldwide go haywire and entire crops and other species start to die off because the magical ocean minerals the bird poo provides the soils aren't present.
A treaty is created that forbids low altitude aircraft over any portion of the ocean more than 5 miles from the coastline. Provisions are put in place that forbids weapons development for aircraft to target naval ships so nations aren't enticed to try to use them anyways.
Later on maybe research finds that aircraft created in certain shapes or colors don't trigger this effect, or high altitude bombing becomes a thing.
There are other situations that could prove highly damaging that would cause a treaty like that to be signed but it needs a component that makes not adhering to the treaty very dangerous for everyone. 445