All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The story of the monk Barsisa was reported by some interpreters of the Quran such as Al-Qurtubi, Al-Baghawi and others when interpreting the Allah says (what means): {[The hypocrites are] like the example of Satan when he says to man, "Disbelieve." But when he disbelieves, he says, "Indeed, I am disassociated from you. Indeed, I fear Allah, Lord of the worlds."} [Quran 59:16]
However, we have not come across this story in the reliable books of the Sunnah. Hence, there is no use in raising such questions or searching for an answer to them, especially that –if we assume that it is true –it is related to the legislation of the people who came before us [i.e. the previous nations before Islam].
If we assume that a man is responsible for the care of a girl who is not a Mahram to him, and he must take care of her and manage her affairs, then there is nothing wrong with that, but he must observe the Islamic conditions in dealing with her: so he does not stay in seclusion with her or do anything that may lead to temptation.
The story of Zakariyya with Maryam, may Allaah exalt her mention, does not indicate that he used to stay in seclusion with her. Even with the assumption that this happened, then the legislation at their time was different from our legislation; it could be that this was permissible for them then.
Allah knows best.