While they tell the same story, they focus on different things. And the memories we see from him in the next sequence are slightly different. In the book, Snape dies in the Shrieking Shack, which connects his character back to the school days his memories will touch on, but in the movie his last moments take place in a boathouse, which I think is a much more visually compelling setting.
But there are subtle differences, and I think overall they make this element of the story better. In both the book and the movie, the scene is very emotional and pivotal, and both are executed well and in very similar ways. When Snape is killed by Voldemort, the memories he gives Harry in his last moments reveal everything about the mysterious character: his love for Lily Evans, his role as a double agent, and Dumbledore’s final plan to defeat the Dark Lord once and for all.