It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that two men asked (him) about (seeking) permission at the three times (mentioned) in the Qur'an. Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: "Allah Almighty is the Concealer of faults and loves concealment." People had no curtains on their doors, nor curtained enclosures in their houses, so sometimes a man's servant, or his child, or an orphan who was under his care would suddenly come in upon him while he was with his wife. So Allah Almighty commanded that they should seek permission at those times which Allah Almighty has mentioned. Then Allah Almighty granted them curtains and their provision was expanded, so they made curtains as well, and people thought that this sufficed in place of the permission which Allah Almighty had commanded.
The Shaykh (may Allah have mercy on him) said: The hadith of Ubaydullah bin Abi Yazid and of Ata weakens this narration; and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13559