I'm pretty much allergic to group activities like that so I don't think it's for me.
I'm not saying you're wrong to find the one more motivating than the other, just that not everyone sees outdoor biking as unsafe, and some people do get a really great buzz from it.
Different strokes for different folks...
Since you have never tried a spin class, you should give it a shot. They're very fun and motivating.