If our actions had no consequences, there would be nothing wrong with anything we might do. This statement is as implausible and impractical in real life as it is in an RPG fantasy setting. Why is that? It is fantasy, after all. It's just a story, isn't it? Copernia provides the environment, suggested directions, and plot elements of the story but relies on the players, guided by the game master, to fill in the blanks. This requires real interaction, between real humans, with fundamental differences in opinion. So to keep a game from degenerating into a philosophical debate, there have to be rules. Perhaps the most debated set of rules in D&D surround alignment.
Copernia is a fictional fantasy construct but needs to have relatable elements that contribute to that suspension of disbelief. In Tolkien's words, "the inner consistency of reality," something that goes beyond imagination. A fantasy world and story, such as ours, has more complexity, depth, and "consistency of reality" when it has a representation of "evil." That evil can be embodied by a shared moral and/or natural enemy, either physically or metaphysically. Evil is that which embodies the antithetical morals of the protagonists, our heroes.
Traditionally alignment was fixed. Players chose an alignment when they create their character. According to the rules of the game, you were bound to act in a manner befitting that choice. The 2nd and 3rd editions had mechanics for classes, spells, and a host of other variables tied to alignment. 5th edition lets you choose whatever alignment you want and do pretty much anything the GM will allow. So does this mean alignment means nothing in the 5th edition? No, it means that alignment is back where it belongs, in the plot, story, and player interaction, rather than in the mechanics.