Self-interest isn’t always the best contributor to the public good