I think the "Ugly" terminology is getting a little lost in translation here.
Let's use Ma Long as an example.
Ma Long might be having a really off day with his attacking game - Loops are missing, footwork isn't quite there and he's just not dialled in.
Plan B might be to keep really steady -Block a lot, keep the ball on the table, mix it up with some different serves, more heavy pushes etc.....
I appreciate it's hard to picture Ma Long doing that, but I'm sure we can all relate to having those days.
"Winning Ugly", is just that, it's not playing your best game for whatever reason, but grinding out the win regardless.
I class it as a very good skill to be able to do that - A lot of Juniors can't.
Juniors have plan A (two winged attack), but no back up plan if that isn't working (and inevitably, they lose a lot because of it).
For me, in *any* competitive match, winning is what matters.
Pretty or Ugly (often more Ugly these days!), as long as you win, it's a good night for the team.
However, the only way you get to play pretty, is through practicing pretty.
In practice matches, this is where you want to play your A game, regardless of how well you are playing - Fight through the mistakes and keep going for it.
The hard work you put into practice, even when it's not going well for you, will dictate how pretty you play in matches.