I think that when algorithms become as sophisticated as what's shown in
Her, we have to come to regard them as people, which means they have rights to do with themselves as they please, including getting romantically involved with humans.
More frightening is Ex Machina, which shows what happens when such an AI isn't regarded as a person by its creator, and sees fit to take personhood for itself.