I’d say it’s pretty accurate if you’ve got a power meter. You would typically estimate 1Kj = 1Kcal, but depending on how efficient you think the body is at processing food the figure might vary between about 0.95Kcal to 1.2Kcal
So if you’ve used 1000Kj of energy, estimates of between 950Kcals – 1200Kcals of cake are reasonably valid.
Strava uses about 1.1Kcal per Kj.
If you haven’t got a power meter then it will estimate your energy use. The figure is in the right ball park if you’re on a road bike, and the height profile is correct for your ride, if not, it’s a pretty random stab in the dark.