In is an adverb and can't take an object on its own, so if you want an object you also have to add the preposition i. So:
- i rummet = in the room
- jag går in = I go in(side)
- jag går in i rummet = I go into [i.e. enter] the room.
The same goes for e.g. ut (out) and ut ur (out of) etc.
I guess it's like how in English we have "off". In England we usually just say "off" and omit the actual preposition (Get off me!) whereas the Americans actually got something right with our grammar for once: "Get off of me!".
I suppose Swedish is simply stricter than English in this case!