Sometimes it's temperament. Some kids are naturally careful, detail-oriented, high-standards. That's not bad.
But often perfectionism is anxiety disguised as standards. "If I'm perfect, I'm safe from criticism." That's the hidden message.
Perfectionism can come from you too. Not in what you explicitly say, but in what you celebrate or worry about. If your kid sees you anxious about small mistakes, they learn mistakes are catastrophic.