There are some benefits of coffee that don't really fit with this hypothesis, though. Like how it decreases risk of kidney stone formation, despite containing chemicals that can increase urinary calcium excretion.
Not really surprising there. It's a diuretic, that is it make you pee, and it's a fluid. Drinking lots of water and peeing a lot is known to help prevent kidney stones.