Here's why:
* It's made up of two words: "prime" and "minister".
* Together, they represent a single concept: the head of government in many countries.
While it's technically a noun phrase, it's so commonly used as a single unit that we consider it a compound noun.