I believe it to be a condition caused by mental and/or spiritual issues. It's not like a delusion that can be easily shoved aside, but it's certainly something that can be overcome. It's common for people to become more attracted to other people after they overcome the issues that were causing a lack of attraction.
I've gone through a phase like that before. Basically, I have standards, but I hated myself at the time. I didn't want anyone I admired to see the me that I hated so much up close. I didn't want anyone I cared about to truly get to know me, so the idea of sex with anyone at all really turned me off.
When I realised I'm not actually that bad, and that's there's people who do like me for who I am, and that I can just fix anything I still don't like about myself, I started to like myself more. And as I started to like myself, I also became more attracted to other people as well, and that's how I grew out of that asexual phase.
If it's something one was born with, then most likely the issues causing it are from a past life. In that case, meditation may help one resolve those and grow out of it.
It's not something that's set in stone like sexual orientation. Although to some extent sexual orientation can fluctuate too, but people will still have certain preferences and tendencies that they naturally tend towards. I believe that asexuality however is not something that occurs naturally in people in the absence of issues that disturb one's sexuality. It's always caused by something. Whether or not this is a phase depends on whether or not someone will overcome that "something".