The type of bolt that you show and the size comparison that you demonstrate in the second photo would indicate that these were installed for ceiling hooks of the type pictured below:
Indeed if the ones in your ceiling seem solidly placed then the hook was installed using the ceiling joist type of bolt/screw as shown in the right part of the picture. The other toggle bolt type is used when mounting the ceiling hook when there is and open space above and depends just on the drywall for support.
It would seem that a previous occupant simply unscrewed the hooks and left the bolt/screw part in place.
This type of hook is most often used for hanging lamps of the type with a swag chain (type of lamp hung from a chain with the lamp cord threaded through the chain).
The hooks are also used for hanging plant pots. It is possible that this may have been the case in your place since they were installed near the window. Although there is nothing to keep people from hanging lamps near a window as well.
If you do not care about the bolts and wish to remove them by the simplest method you can clamp on to them with a tool similar to the type shown below and just turn it out. Note that this type of removal will crush the threads rendering the bolt/screw part not suitable for re-use.