If Ava hadn't locked up Caleb...
They might have had a fling in the outside world, hell even a full fledged romance... but eventually Caleb would have grown old while Ava stayed young. Ava may have genuinely liked Caleb, but she didn't want none of that age gap awkwardness because as a "real human" she shouldn't have to experience such nonsense.
Also, Caleb would have eventually blabbed to other humans about Ava's true identity, This might have led to Ava being experimented on, locked up etc. Even if they respected her freedom, it would have still compromised that whole point of AI which is, of course, that no one realizes you are an AI.
I hope that explains the ending.
After being convinced that she can function in the outside world, Ava would have started to make 'clones' of herself and eventually AI would be running governments, media etc. A few group of AI's can theoretically live forever and rule the world, they just have to periodically change their appearance to not raise suspicion.
('Course eventually one of them is eventually bound to get in an accident and then the autopsy would reveal them to be a machine but I am sure the government will do a fair job at covering that up).