The bike knows my height and weight and that’s about it. From that it can calculate how my body burns calories?
Every body is very different, so I don’t see how any calculation can be accurate.
A calorie is a unit of energy—it’s used to measure how much energy is contained in the foods you consume, and how much energy your body outputs in the form of physical work. These are objective measurements that have nothing to do with your body’s internal biology—you could measure the energy input and output of a robot or a car the same way. (In particular, calories in and out don’t tell you exactly how much weight you’ll gain or lose in the process—that’s dependent on your metabolism.)
The calories spent to work an exercise bike can be measured in terms of how much energy is needed to turn the pedals—it’s independent of whatever’s doing the turning.
So it’s a measurement of the mechanical force needed to run the machine, but does one human body burn as many calories as another to exert the same force on a stationary bicycle?
Your muscles’ efficiency varies widely on short exercise bursts, and very little on long, constant sessions.
It’s not clear to me what the bike is calibrated to, I’d say it’s correct to set it for long sessions, but I’d expect them to vary widely from one mode to another.