Hey there ManyFacesManyNames,
as you've discovered, the rules in the Player's Handbook don't go into a lot of detail about this - that's how 5th edition works, it leaves a lot of the decision making to your DM and you on how to run something.
The examples are fairly good though for gauging the general level needed in terms of specifics.
Making people choose a specific square seems a little detailed compared to how I run the game, or have seen others interpret this rule, but I'm not going to go as far as saying your DM is wrong to choose to use the rules in this way.
I will say that the more usual interpretation of the rules for readying an action require the players to be less specific. Generally speaking the player needs to declare:
- What action they are readying: attack, cast a spell, move etc.
- What they are going to use to do that: attacking with my bow, the spell is sleep
- What is the trigger: Usually when a certain creature performs a certain action, or when an environmental condition occurs.
Note that as soon as the trigger occurs, the player has the choice whether they actually want to follow through, or cancel.
In the case of "As soon as something comes through that door, I attack it with my bow" and then the first creature through the door is a friendly target - the character isn't forced to attack the friendly target, they can cancel their readied action. What they are not allowed to do is revise their readied action, "Oh, I meant the first hostile target" though as a DM this is where some common sense comes into play - it was fairly obvious that they character would only want to attack hostile targets, so you could say, "the friendly npc you weren't expecting to see runs through the door, looking surprised to see you - do you attack him with your readied action? No? Ok, as they run through, hot on their heels is the ogre that's chasing them. Ah, you want to attack that? Fair enough, make your roll!"
For me, the key thing to remember is that D&D is a fun, narrative game. We're telling a story of these characters and it's not a competition between the DM and the players. As a DM, I want the characters to succeed at pulling off heroic acts that make the players happy, I just make it challenging for them to do so, so that the achievement means something! The point here is that this is a game mechanic to help adjudicate what is and isn't possible with regards conditional actions. It's fairly normal for a player to say, "If <thing happens> then my character <does action>" because they don't know the future, but are indicating that they are ready for a situation they predict will happen.
Some other examples
- A rogue with a bow has rolled well on initiative and is acting first. They want to use their sneak attack, but none of the monsters are engaged in combat with the other characters yet, so the player elects to move the rogue to a good vantage point and then chooses the ready action, declaring, "As soon as one of those orcs is in melee range of our paladin, I will attack that orc" - this means the orc could move up to the paladin, or the paladin could move up to the orc, either fulfills this trigger. Personally I rule that saying, "as soon as any of those orcs are in melee range of any party member, I will attack that orc" is a little too vague, but I know DM's who allow that.
- A fighter is part of a group that are hunting a thief in a town and is standing on a ledge above an alley and declares, "I am waiting until I see the target we're hunting run down this alley, then I plan to jump off and land on him, tackling him to the ground" - the rules for doing this are a bit arbitrary, as they allow for grappling and push attacks, but not really a maneuver such as this. That's something else for the DM to rule on, however the ready action here is pretty clear.