Bukkit/CraftBukkit — comment on commit b81df0175da241e3a6b9c6ce43e57462dcee606d
File:  line 0
By Evenprime:

Some plugins "freeze" players at their location, e.g. because they get jailed, didn't authenticate yet or similar. To achieve this freezing, the player gets constantly teleported to his original location, over and over.

Closing inventories on same-world-teleports would make it impossible for players to view or manipulate the content of their inventory while "frozen" like that. Also, all duplication bugs with teleports come from the problem that teleportation between worlds means destroying the player entity in one world and recreating it in the other world, while same-world-teleportations only change the coordinates of the player and are therefore "safe".