"Losing is Fun" doesn't mean you shouldn't be playing to win, it's just a reflection that the game is complex, things are going to go wrong, and you're going to learn from mistakes. Of course, the game doesn't actually have a way to win, so you're going to lose or stop, but you set your goals!
It depends, losing can be fun and memorable sometimes, but nobody likes to lose all the time. Same goes for winning, winning all the time may take away the feeling of challenge from a game, and if that happens it might be even worse than losing, since you may abandon the game altogether.
With games like Dwarf Fortress, Terraria, Minecraft and D&D its the stories you get from the failures that people remember. Yes these do have an ideal way to win. But your more likely to trade/remember stories about the failure or near fuck ups over those wins.
in Dwarfortress 'Losing is fun' works because ridiculous stuff happens. If this was just like Sim City where bog normal stuff happens it wouldn't be 'fun'. But in DF you never know what the next disaster is going to be or if you're fort can survive this one. It isn't a challenge if you only win.
Honestly, I see the whole "losing is fun" motto for Dwarf Fortress as just a form of sado-masochism. I play a game to work towards some great goal and meeting it is often a great source of pride. I also care about the virtual world I'm getting into so I don't like seeing it descend into chaos.
IMO games like Dwarf Fortress aren't games, they're more like _simulators_. There's no end goal other than you wanting to try to do X or seeing where the story'll bring you.
Losing is a right pain in the arse, but that's why I enjoy Roguelikes. Even if you fail, you can still improve from the experience to have a chance next time.
It's also why I detest PVP games like Splatoon, since the level and gear hardly matter because everyone has that friggin' Aerospray.
I think part of why Losing Is Fun for Dwarf Fortress is seeing the way the loss plays out, as it's often a dwarf going crazy (being taken by a mood) and spiraling into a tantrum which slowly spirals through the entire base and causing mass carnage... or a spectacular unexpected failure of a plan.
Playing is fun... but winning while having fun is MORE fun.
(But of course you have to make sure playing is fun, because winning at not-fun is a job, not a game.)