This is a classic einstienian thought experiment. Meant to illustrate, in this case relative motion. In order to focus on the point we must disregard day to day inhibiting factors that effect the outcome that is trying to be illustrated. Eg if the train was going at 1000mph and the cannon fired the ball at 40000mph then the ball would reach escape velocity and never come down. BUT we are not trying to demostrate the obvious, we are trying to show that then a ball direct directly up on a moving train traces and arc back into the cannon.