Barbara or Mike would make sense if they wandered into Courtney’s room and started snooping, but I think Beth would be especially likely to make a big wish that could go very wrong after what happened to Chuck at the end of Season 1.
At this point, I’m guessing Thunderbolt escapes the pen by some kind of accident.
Whether that’s because Courtney fiddles with it and something finally happens or somebody else stumbles across it and frees Thunderbolt remains to be seen, assuming it is an accident.