Obama was required to appoint a Republican to the commission per the rule whereby the agency's commissioner seats must be split between the parties, with the tie breaking seat going to the party in control of the presidency.
Following these rules, when a Republican seat opened on the commission, Obama asked Mitch McConnell for an recommendation, and he suggested Pai. When Trump took over, Obama's FCC chairman Wheeler left the position, and Trump put Pai in his place, and replaced his former seat with another Republican, Brendan Carr.
Ajit was appointed to the chair under Trump (Republican). Ajit was a recommendation from Republican minority lead (at the time) Mcconnell. Ajit has (to my knowledge) always been a republican member of US FCC.