Collective Good and Optimization in Socioeconomic Systems