This answer will depend on whether you are talking about a cash game or tournament.
In a cash game, you don't have to show. It is acceptable for a user to not show, wait for the river and then choose to reveal or muck their cards. That's perfectly acceptable etiquette. In case of both players not wanting to show, the last aggressor is usually required to go first. However, that last part of the rule can depend on the cardroom and local rules.
In a tournament, each cardroom will have their own rules, but generally speaking you are required to show. This harkens back to worries about "chip dumping" where one player will lose to another (on purpose) in order to "give" the other player valuable tournament chips. Requiring both players to show is to demonstrate that each hand is fair and no collusion is happening.