When describing music, sometimes it makes more sense to use sharps and sometimes it makes more sense to use flats. For instance, if we called the key of B flat by its enharmonic equivalent A sharp, there would be 10 sharps in the key signature. Since B flat only has two flats, it makes much more sense to use the key of B flat rather than A sharp.
It's crazy to think that I've been teaching music for almost 20 years. In that time, I've had the privilege of helping hundreds of people get started playing guitar and also improving on the guitar skills they already have. It's funny how often a lot of the same questions are asked over and over.
One of these recurring questions goes something like this, "why do some notes have two names? Why is A# also called Bb? Why don't we just pick one???"