When you switch one editor window to the Timeline, you will see that there is a camera marker set on frame 98 named "Circle" (that is your hat object which is not renamed to something more self-explanatory).
Now with these camera markers it is like animation keyframes: an object (or the scene setting) switches to the values stored in the keyframe/marker on that frame, however if there is no keyframe/marker before this one with a different value, the value is valid from the beginning up unto this frame (and gets changed or not depending on what's following the keyframe).
![camera marker](https://cdn.statically.io/img/i.sstatic.net/XwL9Kecg.png)
Like other animation keyframes, you can change values directly on an object (or scene in this case) and they will show in the 3D Viewport, but when it comes down to rendering, only values defined by keyframes will be acknowledged.
Which means, no matter which object you set as camera, the render will only use the one defined by the marker unless you either would set a marker for the correct camera object or just delete the incorrect marker so that Blender always uses the active camera you have chosen.
To get rid of the marker, hover your mouse over the camera symbol and press X > Delete Markers.
![delete marker](https://cdn.statically.io/img/i.sstatic.net/pBrWC6Of.png)
Now it can be that deleting the marker refreshes Blender's viewport with the last known (fixed by marker) value, so you're back to the "Circle" object again. But if you now change the camera back to the real camera object by either selecting it in the Scene tab or by selecting the camera and pressing Ctrl+Numpad 0 if will not change the camera anymore and use it for rendering.
By the way, when the hat is selected as camera, the scene is not empty because it is not rendering, it is empty because the view direction of a camera object is its local -Z direction, in case of the hat it is pointing downwards, but there are no objects and you have set the background to transparent, so and empty scene is all the hat camera sees.