This bug seems to be currently tracked as MC-123364 although a more relevant reproduction is MC-223409. Here's what I think is happening.
We can take a look at the description part of the first bug report written by Runemoro:
The NetHandlerPlayServer.processPlayer
(MCP name) function checks if the player's bounding box is intersecting any blocks, and if it is, reverts the player's position to the old one.
However, this check is done even if the player has been teleported by a portal block such as the end portal, which can lead to the following problem:
- A player somehow sends a move packet that places them halfway between an end portal block and an end portal frame block
- Even though the move is illegal, the end portal's collision function gets called and the player is teleported into the end (Bug 1)
- The collision checks whether the player's move was invalid and reverts the player's position, but not dimension change (Bug 2)
- The player is dropped into the end at their previous position, likely causing them to fall into the void and die
Doing this check before block collision functions are called (or at least also cancelling the dimension change) would solve the problem.
Now I have yet been able to find why a player triggers teleportation even though they are one block below an end portal block, but as far as I can remember, a player's y position slightly jumps up immediately when they are pushed before being placed in a legal post-push position, as technically there is a collision into a (moving) block.
Assuming this is true, the player is placed in a position between the end portal block and end portal frame block right above the player's original position (which has slightly changed in either the x or z direction, but not fully). This satisfies the condition in step 1, and the bug is triggered. The rest of the quote directly applies to this situation.
To answer your other questions, the functionality of the underside remains the same if the end portal blocks are accessed in a normal manner. Only when the player is displaced by something else that causes their position to satisfy the condition in step 1 does the teleportation act unexpectedly.
As for the technicality behind the game "choosing" an End City, pinckerman has explained the irrelevance.