You do gain something though. By not contributing to the problem the overall likelihood that other people also don't contribute increases because they see a cart put away instead of a herd of them roaming the parking lot. Same as being polite when you aren't required to be.
Society exists because most people choose not to be assholes.