It's not about what the enemy can or cannot do; it's about whether you have broken the momentum of combat to step backward. A rogue can do this because he or she is specially trained to direct that momentum in unexpected ways. Everyone else can only dodge sideways.
The enemy doesn't get an opportunity attack if it's about to become incapacitated or if you are about to teleport, so why should it get one just because you're about to become unattackable for some other reason? The only thing that matters is whether you've lowered your defenses by stepping away. In stepping away, you are considered to have turned your back, however briefly, and left yourself open to a quick jab.