May’s incompetence and obduracy combined with the idiots in the ERG prevented a deal from being passed. May refused to negotiate with either the Labour Party or the SNP.
I note that you mentioned that the SNP wanted to stay: a very reasonable position given that Scotland voted to remain despite what the orange idiot said to the contrary.
Where does the Irish border come into your explanation?