this is from the Talmud: Rabbi Johanan said: Jerusalem was destroyed because the people acted evilly within the law. A story illustrates it: a former apprentice who had become rich was enamored of his master's wife. She returned his love and often visited him by stealth. Once the master needed money and informed his erstwhile apprentice of this. The latter offered to lend him the money and suggested that the master send his wife for it. They remained together for three days, and just as she left her lover, the husband arrived, inquiring for his wife.
"She left me within the hour of her arrival," said the apprentice. "But I have heard a rumor that she has been unfaithful to you."
"What shall I do?" asked the master.
"Divorce her" said the apprentice.
"But her marriage settlement is large, and since it is only a rumor, I must pay it."
"I shall advance you the money," said the apprentice.
As soon as the divorce was effective, the paramour married the woman. Soon he sued his former master for the money, and the latter, being unable to pay it, was compelled to agree to work off his debt by labor. While he waited at the table, his tears trickled down his cheeks and fell into the cups of wine he was serving.
Then it was that decree was sealed in Heaven that Jerusalem should be destroyed. No actual crime had been committed, it was entirely legal as to procedure, and well within the law, yet it merited a harsher penalty than an actual crime would have brought on.