to keep the exhaust clear of the superstructure, first and foremost. if you would vent them lower you would need to isolate a lot more of it against the heat then when you run it all over. second, to keep it clear of the cargo, overheated containers don't work so good
so you always need them higher (or separate) from these.
venting from the side or stern would be possible too, but the troubles that bring are about as expensive as just heightening the stack.