Frodo leaves with the elves because he has fulfilled his destiny to destroy the One Ring, and now he wants to live in a place where he can find peace and forget about the horrors he has endured. The elves offer him a place of tranquility, where he can live out the rest of his days in harmony with nature and forget about the pain and suffering of his journey. Frodo accepts their offer and leaves with them, looking forward to a brighter future away from the darkness of Mordor.