I really don't understand how these things are constructed- I guess there is a spring in there somewhere?
The only spring is the giant C-shaped loop.
One end of the spring is "fixed" in position by its own tension. The other end is somewhat free to move, but restrained by the 2 rollers in the pic below. (It's an eBay pic from the UK, so your roller arrangement may be reversed).
The rollers have flattened areas on them by design, so that as the hinge pivots, the "free" end of the spring will smoothly move as the rollers are forced to roll, rather than the spring sliding over them, which would quickly wear them out.
If the spring lands between the 2 of them, that's the "detent" that holds the door 1/2 way open. If it lands outside of them (as in the pic), it either holds the door fully open or closed.
The noise happens when one or both rollers get rusty and refuse to roll on their pins. The spring then gets stuck and has to jump instead of smoothly glide.
If yours look rusty, and the rollers don't roll, some kind of penetrating oil would be the first step. Liquid Wrench, Kroil, PB Blaster, etc. You may even want to get in there with a hammer and a small punch to smack the rollers around a bit to help loosen them up. Once they're moving again, hit them with your favorite oil or grease to keep them happy.