
We see on various occasions that magic can expand space. For instance, in Chapter Five of Chamber of Secrets:
"Not a word to Molly," he whispered to Harry as he opened the trunk and showed him how it had been magically expanded so that the luggage fitted easily.
And Chapter of Deathly Hallo...