Structured intervals on a stationary bike push the burn rate above an equivalent outdoor ride.
A spin class alternates seated and standing efforts, sprints, and climbs on a set schedule, usually paced by an instructor and music rather than left to your own discretion. That externally imposed structure tends to push riders into harder efforts more consistently than they'd choose on their own, which is why spin edges out a moderate outdoor ride.
At 8.5 MET, spin class sits at the high end of Cal Core's cycling activities, just above moderate cycling and the stair climber.