Do asexual people have sex?
The answer to this varies from person to person. Some asexual people have sex, and some even seek it out. Asexuality is about sexual attraction, which is a feeling you have (or don't have) inside. It does not change based on behaviour – this is in exactly the same way a gay person can have straight sex while still being gay. There are many reasons that a person might engage in sex despite a lack of attraction, e.g., making their partner happy, trying to conceive, being curious, and so on. The most common reason that asexual people give for having sex is "I wanted to please my partner".
Grey-asexuals (e.g. demisexuals) may experience sexual attraction rarely or under specific circumstances. So while being on the asexuality spectrum, they may choose to engage in sex due to attraction.
At the same time, many asexual people don't have or seek sex, due to being sex-neutral, sex-averse, or sex-repulsed. While asexuals and allosexuals alike may be sex-averse or sex-repulsed, the prevalence of sex-repulsion is significantly higher among asexuals [1, p.49].
-  Caroline Bauer et al (2018). 2016 Asexual Community Survey Summary Report. Asexual Community Survey Team.