Woah. I had one snake that acted like that (for a brief time) but it was a WC female. She would flail around and whip her tail around trying to get free, and even musked me once!
It is hard to say why your snake did that. Maybe it did have something to do with breeding season? Maybe your snake had an inkling that another male was around (were there any in other tubs?)