The fundamental problem, as I see it, is that music notation was designed for a 7 note system and modern music is a 12 note system. They managed to get all 12 notes in there, but it is more awkward than it should be, needing to notionally classify some notes(or bars, that's fun to wrap your head around) into a sort of second class status(flat or sharp).
Note for them like me learning this stuff. All 12 notes in common music are equivalently spaced and valid, The normal way to work with them is to pick a subset that sounds good together(a key) and mainly use those. then because the notation only naturally supports 7 notes you annotate the bars to shift their meaning around to match the key notes and for items that still don't fit annotate the displayed note to shift it.
But, this is the system we are stuck with, it works well enough and as I learn I fully expect to overcome then forget about the awkward parts.
Update: This just occurred to me as I was thinking on the subject. The only reason for a flat to exist(they are unneeded and redundant otherwise) is for when you shift a bar up, with a sharp, you need a way to shift the note back down, with a flat.