The origin is the origin for all transformations. The rotate() method does not perform the rotation at that point, it performs it at the time of drawing, along with all the other transformations. So, when it gets to do all of the transformations, it uses what was last set for origin. If you want it to rotate around its center, first use getLocalBounds() to get the size (as getGlobalBounds() takes into account any transformations so far) and then don't reset the origin back to zero.
Can I ask why you need the origin at (0, 0)? You can simply offset its position.