"Civilian" targets can become valid military targets. For example, if an enemy force forms a line of resistance within an urban or suburban area, then it is legitimate to attack and destroy that area. A civilian area that is not occupied by an enemy force is not a legitimate target, and attacking it constitutes a war crime.
The Law of Armed Conflict exists because you can't stop war from happening, especially if you aren't willing to fight a war yourself to stop it.
It's also worth pointing out that war/conflict are not the same thing, the definition of who is protected during a conflict is much broader than members of the armed forces during a formal war.
Sure, but "war crime" is a phrase with a particular history and usage that means something more specific. Even opposing sides in war often agree on some boundaries.