Groupon typically sells coupons for 50% of face value, and pays the merchant 25%. So Groupon keeps 25%, the customer saves 50%, and the merchant effectively sells product for 75% off list price.
Depending on the merchant's cost structure, they may still make a small profit at 75% off list price. For example, coffee shops, yoga studios, and laser tag have mostly fixed costs and low variable costs, so during quiet times they can offer deep discounts and still come out ahead.
Most merchants lose money on each sale, but expect repeat business from those customers, so they compare the cost with advertising. After the initial group of idealists, most Groupon users were bargain hunters, and so the repeat business wasn't as valuable as some merchants hoped.
Many merchants make money on add-ons even without a repeat visit. For example, Groupons for dinner don't include alcohol, which can be a large fraction of the bill.
Another factor is the redemption rate -- some coupons are never used, and in those cases the merchant never has to provide the product and keeps the money as pure profit.
So, it was a good deal for some merchants and not others. Which is true of every form of advertising.