One of the commentary nodes by a Portal 2 developer, Eric Tams, said they used "world portals" to quickly reconfigure maps and puzzles during testing, which allowed them to create rooms that were bigger on the inside, infinite falls, and other sorts of impossible geometry, save for the users own ASHPD space bending.
When we started the project, making any big structural change in a level or the order of levels would lead to hours or even days of busy work trying to reconnect things and make sure they lined up again. If we ever wanted to ship something the size of Portal with the finely tuned balance we desired then we needed a way to be able to make big changes to the layout of the game without paying the cost of making everything line up again. We needed a way to bend space.
[...]
Soon every connection between any space was a portal. We would even switch them on the fly. Even a simple door worked like the cartoons - just a facade painted on a wall that seamlessly opened somewhere else entirely. Once the game settled down we were able to finalize our path and remove all of the world portals. There's only one impossible space left in the whole game. See if you can figure out where it is.
After the map layout was finalized, most of these were fixed into boring linear spaces, likely for the sake of performance, save for one spot. Where is it?
American McGees Alice
. F.e. an iron gate in a wall. From one side it was a normal iron gate, from the other it was a gate (with no iron bars) to a room.