Why, in supply and demand curves, does price go on the y-axis? I know it doesn't actually matter which axis is which, but it seems less intuitive me. When I see a supply and/or demand graph, I always have to flip it in my head to feel like I really get what's going on.

It just seems like if you have one variable (price) on which two other variables (supply and demand) depend, then the single variable should be on the horizontal axis. So why isn't this the convention?
As @KennyLJ points out I think the reason is partly historical. However it is a useful convention for several reasons.


Demand curves are frequently not functions but mappings, e.g. in the case of perfectly elastic demand. So you could not guarantee 'nice' functions anyway.
In this coordinate system the surpluses (producer's and consumer's) are areas under the curves. The explanation is more intuitive and it is somewhat easer to see which integral you have to take.