Why do anime end with spoilers?
It's to get viewers hyped up to see the next episode.  

If they do it right, they don't give all of it away, and they leave the viewer with a sense that's there's more to see, and that they need to watch the next episode to figure out what happens or even how it happened.