>>720085843
In the games, Pokemon shrink down into the ball, hence the name "pocket monsters". The beam of light stuff was something the anime came up with. The storage system seems to be a carryover from early in development when capsules were used instead of pokeballs. It's why you find various items inside pokeballs throughout the game too, because they were simply capsules/containers at one point.

Another fun tidbit, NoA tried to localize Pokemon with redesigns, which included turning Pikachu into a tiger catgirl with huge breasts.