The complexities of the brain haven’t been completely understood by anyone yet.
I think you might understand it better in a way which isn’t accurate, but gives you a better visual of what takes place.
Imagine the United Nations as being always in session, and running the world together. Phone calls come in constantly from each country, and must go through an operator. Each country has its own language.
The brain, in charge of the whole UN, sees an empty chair. It asks where that person went. Operator tries to call, but nobody answers. She reports they are gone. The leader has no word for gone. The closest interpretation is emergency. The leader has no idea what the emergency is, so they get a little freaked out. It imagines fire, or explosions, or flooding. It can’t send help without knowing what the emergency really is.
Phantom pain is what we feel when the brain is confused about which emergency it should deal with, and is trying to make different guesses fit.
There isn’t an emergency anymore. Brain just doesn’t have a word for gone. Other countries try to tell it don’t worry about it, and mostly it focuses on real issues, like hungry, and tired, but sometimes it sees that empty chair and thinks, I still gotta fix things over there. WHAT THE HELL IS YOUR EMERGENCY!!??