"Was it Joffrey's wish to dismiss Ser Barristan Selmy from his Kingsguard too?"
Cersei sighed."Joff wanted someone to blame for Robert's death. Varys suggested Ser Barristan.
So Varys influences Joff to dismiss Barristan, As we know Varys wants Aegon (of fAegon) to take the throne, and having Barristan on Aegon's side would be huge plus for Aegon. But Barristan, who did not know Aegon was alive went out to seek Dany. Varys with his network of spies could have easily directed Barristan to the GC and have Barristan meet Aegon and join him but didn't.
So the question is why did Varys miss an opprotunity ?