So, to the ending, and after a trilogy that centered around the concept of "choice", The Analyst agrees to let Trinity choose the ultimate fate of this new Matrix. If she, like Neo, years to be free then he will let them leave but, if she's happy in her new life with her husband and three children, Neo must also voluntarily reinsert himself back into the power plant. After a rug-pull moment of her walking away before deciding she actually hates the name "Tiffany", the pair reconnect and all hell breaks loose.
The Analyst, despite his assurances, goes back on his word and decides he would rather kill them than let them leave. Afterall, he's rebuilt their dead bodies once before, he'd likely have no trouble doing it again. However, at the last moment, he's stopped by Agent Smith, who has seemingly decided that he has no desire to live in this interpretation of The Matrix, and would rather take his chances with the unpredictability of Neo and Trinity's freedom.
A thrilling chase sequence ensues, with Neo, Trinity, and their new crew all trying to escape both the Matrix and its new "Swarm Mode"; which sees its still-connected inhabitants turned into mindless zombies (or "bots") hellbent on stopping them. With Trinity weaving through the hordes on a motorbike, and Neo using his latent bullet-stopping powers to help guide them through, they eventually arrive on a rooftop to be confronted by two helicopters. Despite their best efforts to repel the now-overwhelming firepower, they realise that their only means of escape is to fly from the rooftops... a power Neo is still yet to rediscover.
They attempt the classic leap of faith made so many times previously in the franchise but, mere meters over the edge, Neo begins to plummet towards the city below only to be held in the air by a now-levitating Trinity. "Are you doing this!? I'm not doing this!!" he exclaims in a panic, as a calm washes over the face the woman who once freed him. She gathers herself for a moment, and flies them both to safety and back into the real world.
It's a shocking moment that seemingly comes out of nowhere and with little plausible justification, but a brief examination of the story so far explains it nearly perfectly...