NPCs are virtual life forms created in order to allow the Holy Grail War to proceed smoothly.
They each have their own predetermined role, and they cannot to deviate from it. However despite their role being decided, they are each equipped with their own unique thoughts and personality.
If NPCs were not realistic living beings, they would not be able to evoke genuine reactions and responses from the Masters who encounter them.
Moon Cell calculated this and this is why the NPCs were bestowed with artificial intelligence.
However an NPC’s “personality” is a one-time-only prospect, and no deviation is allowed from their preset perspective of the world.
Once the Holy Grail War ends, Moon Cell confiscates their accumulated experiences including any gained physical ability, knowledge or personality development. Everything is reset, and they are equipped and re-tuned in preparation for the next Holy Grail War.
To the NPCs who know they will suffer this fate, Masters are an object of envy and even hatred.
Jerked around by the illogical actions of humans and treated as expendable tools, more than a few NPCs are unsatisfied with their existence in the world.
In a way, life is bestowed upon them, but it is also denied to them.
They are simply something that is “here” or “not here.”
Their discontent built up to the point where it gave birth to an urban legend. It’s said that at the end of their so-called reincarnation cycle, NPCs with a high level of humanity, meaning those who obtained a soul, are upgraded to be high-level AIs.
Of course, no such future exists for them.
Even if such a thing were to happen, as far as Moon Cell is concerned, it would be no more than a meaningless bug.

Fate/EXTRA Material: Encyclopedia of Fate/EXTRA