I suspect it's a mix of cost and interior space.
See, for interior space, that pipe has to go somewhere, so there would have to be a channel inside the bus to route the pipe to the top...this would remove passenger space.
Cost because they cannot afford to lengthen the bus, since it adds unecessary cost, so the cheapest option is to just run it straight from the front to back. Bonus is less bends as well, which means the exhaust piping itself is cheaper as well.
Gotta keep in mind schoolbusses are built as cheaply as possible....also amazing how long those things last with how cheaply they are built.