Think of gate lines at railway stations for a similar analogy (off peak/ peak restrictions).
Gate lines at railway stations also take into account season tickets and QR codes which have been generated minutes or seconds before. They're now live to the internet / web database, where the access codes are stored.
If you have to prebook then why make that conditional on the place being fully booked? Wouldn't it just enforce that always?
Because, as per the terms of your pass, you don't HAVE to make a booking. Much in the same way that someone just turning up to Alton Towers on the day, and paying the walk-up price, doesn't have to buy their tickets before hand. Although in both cases it's advised. In either scenario, if capacity is reached and the person doesn't have a pre-book, they're not getting in.
Much in the same way as if the park is fully booked, you won't be able to buy a ticket. If the park is fully booked, you won't be able to make an online booking or scam your pass and be granted entry.
Much in the same way as if the gig you want to buy tickets to has reached capacity, the booking system won't let you buy tickets. Or the cinema. Or even your local gym.
Most gyms cater for around about 1,000 customers. You can make bookings online for classes, or the swimming pool, in advance and it's often advised. If it's fully booked, and there aren't any cancellations, the gates won't let you through. If it's not fully booked, or there are cancellations, you're allowed through.
It really isn't a clever system, it's nothing that requires complex coding or engineering in the background. It doesn't even need to be an online system, as such. it can be a local lookup. Or the gates are checking against a local database, which itself is online, or refreshed regularly. It already has to do this for the non-pass tickets purchased through the Alton Towers website.