adding to @moonboots Comment: In edit mode, select vertex, vertices, or part of the "bar" you want to be the Pivot point (internal cylinder), and then RMB: Snap vertices: Cursor To Selected.
Then in Object Mode: RMB: Set Origin: Origin to 3D Cursor. Then your pivot point will be correct
I then did the same for your "Plane.014" connection point internal cylinder.
I then aligned the bar (origin) to the Plane.014 origin:
And then the rotation of the bar was as desired:
Here is the result:
Also consider setting the Pivot Point to Individual Origins when doing these adjustments, as the 3D Cursor may not be where you want (usually located at 0,0,0):