I never saw S4, but I got the impression that they saw in John a like-minded student of wormholes, if one well behind them, a junior student in their area of interest, if you will, and they ran him through that episode of tests to see if he was worthy of the information. Deciding that he was, or almost was, they gave him the data but didn't make it easy for him. Much like teachers, really.
But as I said, I didn't finish the show (not by choice, it seemed like somebody was hogging the Netflix copies), so there may be more I never saw.
See the solution to the fighting in Peacekeeper Wars.
IMHO. The Ancients needed a neutral referee/enforcer that both sides would trust, fear and want. The worm hole knowledge meant that both sides wanted him. His use of worm holes and other weapons over the previous 4 years meant that both sides feared him - he had defeated all their weapons and shown an ability to kill. Getting the trust was the hard part. Neither the Scarrans nor the Peacekeepers would trust a third party, such as the Ancients, to act as galactic policeman without becoming the boss. Scarran society does not support any boss other than their Emperor so the referee/enforcer would have to be from the Peacekeepers. An ordinary Peacekeeper would just obey the High Command so a wild Sebaceans was needed, the Ancients chose the Earth human John Crichton.