I noticed this too. Playing Electric, and I had my starter, Aron, and Honedge. Those last two aren't Electric types and can't learn Thunderbolt (my gym TM), but it still let me carry on with gym battles. Even after playing some more, increasing my gym level, etc, the game still lets me get away...