When the player is in a dimension besides the end, and throws an ender pearl into an end portal while simultaneously entering the portal themselves, they will be teleported to their respawn point (or to world spawn if they do not have one) instead of to the obsidian platform.
Conversely, when the player is in the end and throws an ender pearl into an end portal while simultaneously entering the portal themselves, they will be teleported to the obsidian platform.
In both cases the player will take damage from using the ender pearl (unless they are in creative mode).
This issue does not seem to be easily reproducible with commands so see the attached videos for how to reproduce this.
Per MC-276016, it is intended that throwing an ender pearl into the exit portal teleports it (and therefore you) to world spawn. However, it should not be possible to end up at world spawn by throwing a pearl into a stronghold portal, so I will update the report to focus on that.
Edit: seems like this also affects the end, throwing a pearl into the exit portal while jumping into it will teleport you to the obsidian platform.