If we are talking about humanoids that are similar people like the PC, then sameish. (For literal weird monsters it doesn't really matter.) For usability stuff often benefits from some streamlining, and a lot of NPCs are not as gifted than the PCs so they don't need all their capabilities, but they should use same "building blocks." So an NPC assassin has the same sneak attack feature than the PC rogue does, casters have spells chosen among the spells available to the PCs rather than some unique spell like powers etc.
There can of course be some exceptions to represent rare forbidden techniques and forgotten ancient spells etc, but I think the stock NPCs in MM and the like should follow the principle I described above. It is easier to use as the mechanics are familiar, it makes the world feel more consistent and predictable, as well as avoids the questions of why the PCs cannot learn the NPC powers.
I also like if the classes are things that have some cultural and/or metaphysical existence in the fiction, rather than just arbitrary power packages, and having NPC members of the class to be around reinforces that.