Islam has slavery related laws so that there are rules in place if the situation requires them. It doesn't mean that having slaves is normal or encouraged, just that if you end up with slaves or concubines you'll know what you're allowed to do. It also ensures slaves have rights of their own.
Off the top of my head, if you had a slave you'd be responsible for providing for them. You'd also have to treat them well, because cruelty to a slave is a sin. You're allowed to have sex with a female slave, but if she bears you a child you have to treat her like a wife. I think you need permission to have sex with a female slave too, but I'm not sure.
Islam emphasizes that everyone is a slave to God, no matter who owns who. Slaves are just as human as anyone else, and you will be judged for treating them badly.
As for Ayesha, I don't know enough on the subject. What I do know is that arranged marriages are a thing in a lot of Asian countries even today. Generally, when the woman is underage the marriage can be completed, but she lives with her parents and continues life as normal until she becomes of age. They're usually political marriages, where the uniting of families is more important than allowing sex. Marrying an underage person doesn't imply having sex with an underage person