It's always seemed weird to me that a "gym" is more or less a "dungeon" (i.e. tunnel full of monsters with loot at the end). So why were they not just called that in the original games? It's possible that pokemon gyms were meant to be like a fitness gym. I'm not saying this is correct, but you can extend the idea and get something interesting out of it.
Why would Brock use only rock pokemon? Because it's a fitness gym where rock pokemon train to become stronger. You are their personal trainer. Brock is the leader/owner of the gym, and the gym trainers all have memberships because they are taking their rock pokemon there to learn from him and become stronger.
In other words, you aren't being clever in the eyes of the gym trainers when you bring in your water type and start challenging people to fight you. They will just assume that the message is lost on you, since you traveled across the whole country to visit a specialized rock type training center and you didn't take advantage of it.
A badge, in this world, might signify that you have mastered all the rock pokemon techniques that are taught in the gym. When you get all 8 badges, it signifies that you have mastered the battle strategies of a wide variety of pokemon, and this is used to match you up with trainers that are demonstrably of similar skill.
The best part of this is that it's a self-regulating system. It all depends on how much effort the individual puts into it. If you get all 8 badges through the system of "My water type beat all these rocks types" etc etc, you are going to be matched up with someone eventually who took the gym challenge seriously and whose water pokemon mastered all of the advanced water techniques from the Cerulean Gym. That pokemon is going to quickly demolish the other trainer's water pokemon who was used to fight rock pokemon but sat out in Cerulean in favor of an electric type, and so on.
So some instant gratification type people will just type advantage their way up to the point of the pokemon league tournament, but they'll get quickly demolished by the people who didn't do that, so they'll have to end up back in Cerulean with an embarrassed look the next year trying to get some actual training for their water pokemon.
So, what do you guys think? A lot of this is just stating obvious things, and a lot of it is similar, but the underlying foundation of the system is different, and it provides an explanation as to why gym leaders have monotype teams rather than diverse ones.