Those are not great examples.
Bubble gum puts the buyer in a worse dental health situation.
Windows is a monopoly that controls the desktop market and the buyer would have been better off with a richer market with a variety of options.
You could have said cigarettes. They provide the same pleasure benefits as gum with unhealthy outcomes for the buyer.
You are making the mistake of asserting that the buyer exactly shares your values.
With Windows, I didn't assert that it was the value maximizing case, merely that it benefits both parties. Which it does, mostly likely to the advantage of the buyers.