When/why is divorce considered a sin?
It goes back to understanding what marriage is intended for. Marriage is meant to be a picture of the covenantal devotion that Jesus shows the church. Pretty sure Jesus said He’s not going to give up on that. So a divorce is a sin because it wrecks that picture that God intended. But in the same way a bad marriage wrecks it.
So divorce is sinful for that reason, but at the same time God understands that in this earth we will be sinful and many times He will legally allow for sinful actions in order to curtail our sinful actions. So divorce is not the ideal or the intention, but we must be careful not to say that divorce is condemnable or unredeemable.