I am going to start to get technical. If this is a problem, reply and tell me to stop.
DMG, pg 60: Encounters start in one of 3 ways: one side is aware of the other, both sides become aware of each other at the same time, or some members of one and/or the other group become aware of the other group. If only some of the combatants are aware, those get a partial action. If there are several rounds to prepare, the aware group can take full actions. "If both sides are aware at the same time and can interact, both should roll initive and resolve actions normally"
DMG, 64, col 1 second paragraph, first sentance: "Don't allow the players to use the ready action out of combat."
Ready is a standard action, so you can move around and still ready action. You can only do this during combat. You can only start combat in an encounter. An encounter only starts when you become aware of the the other group. Ergo, no ready action to shoot what is on the other side of the door.
If you don't like this argument, we can discuss ready action itself, and how it can only be triggered by an enemy action. Since that is off topic, I will refrain.