After a successful trip to Vegas, Jay decides to purchase a dog butler statue as a gift for himself. He thinks everyone loves it, but Gloria detests it and tries to get rid of it. Every time she comes home, she’s reminded of the dog and it ends up scaring her. While Jay clearly receives private benefits from his purchase (and he also thinks there are social benefits), Barkley has imposed an external cost on Gloria, which Jay has clearly not considered.
The Coase Theorem would suggest that if Gloria is truly unhappy about Barkley, she could arrange some form of payment to get Jay to put him away. We learn later that the fight between them was enough for Jay to recognize that he’s imposing a cost on Gloria, and instead decides to get rid of the butler.