NMF is only used after opener rebids 1N (or 2N if not playing anything else).
Sometimes with weak or invitational hands, you can't show 5.
For example:
1H 1S
2D ?
Opener is giving you a choice of two suits. Opener may be 5-5 or even 6-5. Usually, with a weak hand you choose one of opener's 2 suits by either passing or "taking a preference" to 2H (which is the same as passing). To refuse both opener suits requires a 6 card suit (or a really good 5 carder) because opener is unlikely to have many spades.
With an invitational hand, you are also limited when holding 5 spades in this auction. After the above auction, how could you show 5 spades rather than 6, an invitational hand, and still stay below game???? Not enough bids. So in this auction, the catch-all 2N is used. If opener is minimum, opener passes. If opener is maximum, opener can bid 3C (0544), 3D (55 or better), 3H (64), 3S (3541), or 3N. Recall that opener's 2D is still almost unlimited, so any bid over responder's 2N rebid is a GF.