I Am Legend scrapped its original ending because test audiences 'felt cheated' by the big twist
Discussion
(winteriscoming.net)
I just remember watching the movie, then finding the alternative ending (only the last couple minutes) and realizing the polar opposite naritives.
One is where he becomes martyred fighting the enemy, the other is realizing even when others are different, we are still able to relate and find peace.
So yeah, whoever made that decision ruined the entire movie.