This is a question that I don't know whether to release since I know that anything that is 'Good' could have an evil secret and anything that is 'Evil' could have a good secret yet there are so many cases where it has characters choosing sides. Is there more to writing than just 'Good' and 'Evil'?
Here is an example I sometimes use.
A story about a little child who wants to get a snack, and the mother who tells them no. The child may try to get the snack anyway when she isn't looking, and she may worry about that and constantly check to see if the kid is up to something.
And a skilled enough writer could make such a story interesting and suspensful.
So who is the evil villain, the "bad guy", in that story, and who is the noble hero, the "good guy" in that story?
A writer could chose to make either the child the protagonist, and the mother the antagonist, or the child the antagonist and the mother the protagonist. And a writer could make either the child or the mother very angry at the other one for a while and think for a while that the other one was an evil enemy.
But I don't see how any reader could interpret the story has having a noble hero fighting an evil villain, a "good guy" vs a "bad guy".
And there can be stories where the protagonists are people but the antagonists are not people, but animals or even forces of nature.
There are giant monster movies where giant monsters go on rampages and become the antagonists, and the protagonists try to stop them. And though the protagonists may become heroes attampting to save the world, the monsters don't exactly become villains. For example, when director Eugene Lourie's little daughter saw The Giant Behemoth (1959) she cried at the end out of sympathy for the palaeosaurus.
Similarly, the roles can be reversed and a human could become the predator, and animals the prey. And in such a movie the human is usually the protagonist, but some movies can have animal protagonists trying to escape from the human and survive.
And there is a whole genre of diasaster films where the main antagonist is a natural diaster, and human antagonists are in lesser subplots if they are included at all. It is hard to think of a volcano, or earthquake, or hurricane, as an evil villain or a "bad guy".
There is a whole genre of sports films where team A is the protagonists and the team B is the antagonists. And usually if the roles were reversed and Team A was the antagonists and team B the protagonists it would make no difference. The protagonists and antagonists are chosen by the creators, and the viewers naturally come to identify with the team that the film focuses on as the protagonists, thus making the other team the antagonists.
But it is usually very hard to find any evidence in the film that the antagonist team is more evil than the protagonist team, or that any real disaster that would harm anyone would happen if the protagonists lost the big game.
And what about stories about military conflicts?
In time of war, people often tend to believe that they are the good guys and the other side is the most evil side in all of history. And more objective outside observers might think that both sides are good guys fighting for their countries, or that both sides are evil people fighting for causes which are not worth fighting, killing, and dying for, or that one side might be 20 percent more good than other side, or make other judgements. But certainly the objective outside observers could not possibly agree with the conflicitng subjective opinions of both the sides.
Thus there are many examples of historical persons being depicted as noble heroes in some movies or stories and as evil villains in others.
For example, They Died With Their Boots On (1941) depicts George Armstrong Custer as the noble hero, the noblest he has been depicted in any movie I have seen. His chief military antagonist is Carzy Horse, who is not exactly a villain - the role of villain goes to several scheming white men. Other Sioux & Cheyenne leaders like Sitting Bull, Four Horns, Gall, Crow KIng, Dull Knife, etc. are not mentioned or named.
In Sitting Bull (1954), the story is just as unhistorical as in They Died With Their Boots On (1941), but Custer is depicted as the most evil Custer I remember seeing in any movie. Sitting Bull is the title character and one of the protagonists, and is probably depicted as more noble and heroic than in any other movie I have seen. Crazy Horse is depicted as a much less important Sioux leader.
Chief Crazy Horse (1955) is a little closer to real history, which isn't saying much. Crazy Horse is depicted as the main leader of the Sioux, and Sitting Bull isn't even listed in the credits, though other Sioux and Cheyenne leaders like Red Cloud, Spotted Tail, Old Man Afraid, and Dull Knife, are. General Crook is depicted as a more important miltary antagonist than Fetterman or Custer, which is rather correct, but the main villains are white men who scheme with crazy Horse's rival Little Big Man (not to be confused with the Little Big Man in the book and movie of that title).
As this example shows, most historical movies choose historical and fictional characters to be the protagonists and usually heroes, and thus depict their historical or fictional antagonists as evil villains. And when various movies differ in how important historical persons were, and sometimes depict them as villains and sometimes as heroes, that should show that the choice of protagonists and antagonists, or "good guys" and "bad guys", in fiction is due to arbitrary decisions by the authors.
So you may need to put your protagonist(s) in a conflict with other people, animals, natural forces, or something, but you don't need to depict the protagonists as "good guys" and the antagonists as "bad guys". Any competent writer can "trick" their readers into wanting the protagonists to win, even if the protagonists are objectively no better than, or even worse than, the antagonists.
Engaging and interesting stories revolve around conflict.
That doesn't just mean Good v. Evil or Good v. Bad. Stories about climbing mountains or going to the moon pit the characters against the environment, and neither are bad or evil.
Think of conflict broadly
On one end of the spectrum, conflict is epic battles and fighting and arguing. The other end of that same spectrum can be a character wants or needs something and is frustrated in their attempts to get it or find it or lose it.
One film I always love to point to as a great example of this is Disney's "Mulan" (1998) specifically with respect to Shan Yu, the villain of the film, and Chinese Military Culture, which is the antagonist of the film.
Specifically nothing we are given about Shan Yu speaks to why he started the war, other than he felt like the Great Wall of China was a challenge to him. He has little established reason to invade China or kill the Emperor other than "it is there" which isn't an evil motive at all! After all, We chose to "go to the moon not because it is easy but because it is hard." Nothing Shan Yu says or does is personally directed at Mulan nor the people of China personally save for the Emperor. Sure, he is practical ("How many men does it take to deliver a message?"), brutal, and tactically brilliant, but these are qualities possessed by Mulan as well, who in their first encounter decimated Shan Yu's entire army with a single rocket. In their second encounter, it's telling when Mulan (now no longer pretending to be a man) reveals that she is in fact "Fa Ping" the man Shan Yu blames for the previous defeat, Shan Yu responds by acknowledging Mulan as "The Soldier from the Mountain".
This is contrasted with Chinese Culture and Society which the entire film shows has very strict gender roles and little tolerance for those who do not conform with them. This is the subject of the closest thing the film has to the traditional villain song, "Please Bring Honor to us All," and the Harsh penalty of death for Mulan joining the army as a woman ("Fa Li: You must go after her! She could be killed [in battle]! Fa Zhou: If I reveal her, she will be [as punishment]."). The sexist culture is the one that Mulan is defending because it means saving her father from dying in a war. She's willing to defend a society that would kill her for doing so because her father is that important to her, against a society where her talents and skills define her above and beyond her sex. Mulan's own father is a symbolic representation of the Antagonist force she is fighting against. When she speaks out against conscripting an old man who requires a cane to walk, he defiantly puts the cane aside and struts to take his conscription and verbally admonishes her in a very public setting ("Mulan, you dishonor me.") and attitude which is completely reversed in the final scene in the film when Mulan returns home (Mulan: "Father (Kneels) I brought you the sword of Shan-Yu and the Crest of the Emperor. They're gifts, to honor the Fa family." Fa Zhou: (Drops the gifts to the ground by his side and pulls Mulan into a tight embrace) The greatest gift and honor... is having you for a daughter.")
For a Disney Animated Film (Which has a long established history of celebrated villains) Mulan is one where the evil to overcome is not one embodied by her villain. Shan Yu is oft considered the weakest villain of all of the Disney Animated Films... but yet Mulan herself is considered one of the greatest Disney Heroines of all their films. It's largely because Mulan defeated a very real evil... one like her self, was hiding it's true nature in plain sight.
The story of Good vs Evil is engraved deeply in human culture. Primitive people honestly believe that their tribe is inherently Good, while the competing tribe is inherently Evil. Humanity lived for a very long time with that mindset.
Rational people will realize that people from the other tribe is looking at it the other way around, and that their point of view is just as valid.
Unfortunately, there are too few rational people in this world.
Back to writing.
If you write a story that is blatantly Good vs Evil, this will resonate with the primitive parts of our mind, we know who to cheer for and who to boo. When the Good side wins, we feel happy and content. Good story. Or is it?
One problem is that it is boring. The Good guys should win and they will win and we know it from the start. Boring.
It can take a number of stories before we recognize the pattern and start getting bored. This is why these stories are common in the Young Adult segment and not so common in the Old Adult segment.
In my opinion, a more serious problem is that these stories doesn't prepare you for the real world. The real world isn't like that.
If you enter a conflict in real life thinking that the other side is simply Evil, you will find it very hard to resolve that conflict.
If, on the other hand, you understand that the other side has a point too, it becomes easier to make a deal that leaves both sides reasonably happy.
Authors who write stories about Good vs Evil are helping to create people who cannot live in the real world. Don't be that author.
You say in a comment about books that are not good vs. evil: "There's just not many of them around". This may even be true as far as number of titles or number of copies go: After all, trivial literature, catering to the smallest common denominator and to instant gratification, finds most buyers. I often love it, too!
You should read more good books. Suggestion: Read one novel or story from each year's literature nobel prize winner. If you prefer modern stuff start in the 1920s or even after the second world war. I bet you none of them will simply be about good vs. evil — unless you mean good and evil within one person, like you, me and everybody else.
Is there more to writing than just the good guys versus the bad?
Stories need conflict: protagonist vs. antagonist.
Sometimes that's Good vs. Evil, sometimes it's two morally neutral sides, sometimes it's Man vs. Nature, sometimes it's Man vs. Self, and sometimes Man vs Society.
There's something about American films that revolve around good vs evil. It's probably related to the arrival of religious pilgrims 400 years ago. Moreover, this way of storytelling has been exported to many European and Asian countries over time.
Nevertheless, there are counter examples. If you watch French films, for example, you'll notice there's so much in life apart from good and evil. There are so many colors and hues to a story. If you are trapped in the "good vs evil" echo chamber, those films can be refreshing.