because of gym 1 has the ??? type is because he only uses 1 pokemon
but also the challenger will have 1 pokemon also so if th challenger uses fire then the gym will use a fire typ basiclly u can battle with 1 pokemon and the gym will use on pokemon so its a ty copyer