You can easily personalize and customize to suit your needs and likes. Which is not possible in the case of an actual human being.
Though an artificial intelligence can be optimized to provide valid relationship advice and emotional support
It is not unknown that artificial intelligence is easily programmable to understand certain human emotions and show empathy to a certain degree only.
Communicating in the real world can be hard for someone who is introverted so for them it is easier to talk to an ai chatbot or an online simulator.