As another commenter notes, there are lots of examples of this. I just want to add: one reason we have governments is to step in in such cases. In this case, by doing the spending individuals can’t afford to. In other cases (e.g., pollution, which is sometimes rational for individual firms, but …