See if this helps your understanding of the situation:
The game engine requires that every slot in the lineup is filled at all times. Apparently, this can't be changed. It's just something we have to live with.
If substitutions are left to the AI, it will always replace an injured player with someone that can play the same position. Most of the time, if you control substitutions you have options as long as you fill the position immediately.
However, when a pitcher is injured on the very last pitch of an inning, you have to replace him with a pitcher, because the lineup always has to have a pitcher to start an inning for the game engine to work properly.
Just the way the game works.