The ending of F. Scott Fitzgerald's "The Great Gatsby" can be interpreted in several ways, but one common interpretation is that it serves to emphasize the tragedy and disillusionment of Gatsby's American dream. Gatsby's dream was to win back his former love, Daisy, and attain the wealth and status that would secure her love, but his pursuit of this dream leads only to his death and Daisy's ultimate rejection.
Additionally, the ending highlights the emptiness of the lives of the wealthy characters and their lack of morality, as they are unfazed by Gatsby's death and go about their lives as if nothing has happened. This can be seen as a critique of the shallow and materialistic nature of the upper class during the 1920s.
Furthermore, the ending emphasizes the idea that the past cannot be repeated or regained. Despite Gatsby's attempts to relive his past with Daisy, their reunion only highlights the stark differences between their present lives and their former romance. The final lines of the novel, in which Nick muses that Gatsby's dream will "survive in the green light, the orgiastic future that year by year recedes before us," suggest that Gatsby's idealized vision of the future will never be realized.
In conclusion, the ending of "The Great Gatsby" highlights the tragedy of Gatsby's failed American dream, the emptiness of the lives of the wealthy characters, and the idea that the past cannot be regained.