Where you see spoilers, someone else sees clever marketing.
Typically, episode titles like "Y's Ultimate Attack! Z Goes Down!" are used in long-running shounen action shows. Long-running romance shows will also sometimes use episode titles like "Throbbing heart of Y! A Kiss with Z at Last?!" for the same reasons. But shorter-running shows will often have opaque titles like "Ultramarine" or "Intermezzo of Light and Shadow" or "Rhapsody in Flu" that touch only lightly on the story, if at all.
Long-running shows are long-running, naturally, and they have both a small core of dedicated viewers who will turn up for every episode on a weekly basis no matter what, and then a wide diaspora of casual fans who might catch an episode here or there and might skip a few in the middle. For casual fans like these, such episode titles are helpful for a few reasons:
- A quick scan of recent episode titles can get you up to speed on what happened ("So, we had 'The Battle Kicks Off! Y vs. Z', then 'Z Overwhelmed?! Secret Attack!', then 'Z Strikes Back! Y On the Ropes!', and now I'm feeling good and ready to tune in for 'Y's Ultimate Attack! Z Goes Down!'")
- Maybe I, a casual fan, already know that Y is going to beat Z in the end, because come on, Y is the determined scrappy hero who's not too smart but has a dream, and Z is the rich, snobby jerk who treats his bit beast like a slave, doesn't believe in the heart of the cards, and eats kittens. So I'm not interested in following the whole back and forth as Y appears to be winning, then Z comes back and seems to have the upper hand, then Y pulls out his ultimate attack that he learned from his dead master's final breath and wins the battle. But maybe I do want to see what Y's ultimate attack is, or I just want to see Z go down because that guy's a jerk and he's had it coming for the past 43 episodes.
- Or, continuing that thread, maybe I, a casual fan, had started to lose interest in the show because it was dragging on forever, and had stopped watching it, but Z's defeat is going to lead us into a new arc where things get interesting again. (In real life, I got bored with the "five minutes till the Planet Namek explodes" battle in Dragon Ball Z and stopped watching the show, but became interested again when future Trunks and the Androids appeared.) Seeing that next week's episode is where Z finally goes down, I know next week or the week after are when I can start watching again.
- Or maybe I, a casual fan, had been following this whole Y vs. Z battle, but I was thinking of skipping next week's episode to go to an onsen or eat some ramen or learn some ikebana or polish my katana or whatever else those Japanese people do when they're not watching anime. However, upon seeing that the title of next week's episode is "Y's Ultimate Attack! Z Goes Down!", I know that the fight is about to end and we're moving on to something else, so I might as well tune in next week and see how it all turns out.
The studios want to go after those casual fans because there are far more of them than there are hardcore fans, and the hardcore fans are in it no matter what anyway, so there's no reason to bother doing things to hook them in. But the casual fans are constantly teetering on the edge, in danger of falling off and being lost. So the studios have to show their cards a little, get those casual fans good and riled up for next week's episode so they'll keep on watching. If they can keep some of those casuals hooked, they might even transmute into hardcore fans after a while, and start buying wall scrolls and figures and tie-in manga and DVDs and dakimakura covers and all that, where the real money is.
I would argue, however, that these titles aren't really spoilers in the sense that they don't "spoil", i.e. ruin, your enjoyment of the episode in any real sense. (At least for most values of "you".) Long-running shounen action has very few tricks up its sleeve. Some characters fight, somebody wins, somebody loses. Typically it's the heroes who win, except in a few limited scenarios where some individual hero might lose. But the heroes always ultimately win, even if some of the individual fights are lost.
Basically, these shows have very simple plots. If you've seen enough of them, you can typically predict in any given scenario what's going to happen. But people who know what's going to happen, episode titles or no, can still enjoy these stories. I'm so, so, so over this genre, but I still picked up a few volumes of One Piece and enjoyed them. Was it the complex plot? No, I knew exactly what the ultimate outcome was going to be in every story. The realistic characters? No, the characters are simple archetypes. The uproarious humor? No, the humor is repetitive and childish. I enjoyed the unique art style, the inventive action scenes, the creative world. I enjoyed seeing Luffy engage in a weird battle where he has a giant ball of gold solidified around his hand, even though I already knew he would win it. I enjoyed the weirdness of seeing a reindeer take some kind of magic drug and transform into a super reindeer. The outcome of the fight was a foregone conclusion; it was obvious from how it was set up that Chopper would win the fight after taking the magic drug. But knowing this didn't ruin my enjoyment of it.
I already knew Luffy was going to win every battle where the stakes really mattered. I already knew he would end every story arc as the same idiot with a dream he'd always been. I already knew Sanji would hit on girls and Usopp would cower and Nami would yell. Those don't matter. To enjoy this genre is to enjoy the journey, not the final destination. What in other genres would be window dressing or added style is the entire point of the shounen action genre. It's the ultimate triumph of style over substance. A one-sentence episode title can only spoil the plot because the plot is so simple, but the plot is so simple because it's not the main attraction; the style, action, powers, and raw teenage emotions are. If you're finding that the episode title ruins your enjoyment of the episode, maybe this genre just isn't for you. Maybe you need something with a more complex plot to enjoy.