A player can only hit a monster with a hitscan attack if the monster is within his (vertical) field of vision. When it is in a neighboring sector far above or far below the player's, it cannot be damaged.
The monster's attacks experience no such constraint, however, and seem able to hurt the player no matter what the difference in altitude. For example, if an Imp is on a ledge above the player and the player is hugging the bottom of the ledge, the Imp can scratch the player.
This is an artifact of Doom's primarily two-dimensional nature.
A notable example in a stock level occurs in the level Industrial Zone of Doom II. When moving across the open ground between buildings, the player will likely find themselves under fire from Chaingunners on the walkway of the central building and the battlements of the castle in the northeast, without any way to retaliate without finding higher ground.