Also a lot of harmful and/or combustible liquids are clear like water. Methanol, ethanol, propanol, acetone, benzene, cyclohexane are all highly combustible and colorless. Also concentrated nitric acid or concentrated sodium hydroxide lye are both colorless and cause severe chemical burns.
This was in the 80s, but I do recall when soda machines were first installed at my high school. One side effect was it became OK to roam the halls with cans, which meant you could pour vodka into them in your locker.
I think it's mostly for chew spit. Depending on where you're at, it's still not uncommon for kids to be using chewing tobacco or snus during school hours. If you were sly with a colored bottle, you could spit all day and never get caught. I'm not saying this is a great reason, but this isn't totally illogical.