First & simplest: DOJ/FBI is made up of people, not of automatons. When you piss people off, you alter their behavior. Levison found himself in a situation where the welfare of his users depended in large part on how DOJ opted to behave. In order to make the most powerful statement he could about his dislike of DOJ's investigation, he deliberately provoked DOJ, spending his users welfare for his own PR ends.
Secondly, and I think equally importantly: Levison's actions made it easy for DOJ to demonstrate that he was untrustworthy. Their original demand was for metadata about a specific account, and the court record indicates that they were willing to spend time finding ways to cooperate with Levison, whose responses appear to have been inconsistent with his previous actions w/r/t/ court orders for Lavabit. By the end, no show of cooperation from Levison was needed, because Levison had made it clear to the court that DOJ had grounds to demand enough information for them to control the collection of the data they were after.