A skeleton inside the body provides support during growth, which allows vertebrates to grow larger than invertebrates.
It also gives them a greater freedom of movement because internal skeletons are lighter than external ones. You can compare an internal skeleton to the frame of a kite. The kite’s framework does not need to be large or heavy to give a big kite strength.
On the other hand, if the support were outside, like a shell, the kite would be so heavy that it would never get off the ground.