For instance suppose the marginal buyer would spend $20 for a product and the producer can produce for $18 and the market price is $19, resulting in $1surplus to each party. If a $3 tax was put on the product, the transaction wouldn't take place.
So you went from $2 social surplus to nothing and no tax benefit.
Any arbitrary price distortions will result in dead weight loss or the overall social surplus to go down compared to no distortion