I think he had a “free gun” wish, and went someplace he knew there would be one or more laying around. They probably advertise for the CCW classes, and I’ve seen flyers for classes like that with instructions not to wear your gun or have it loaded when you get to class, which would necessarily mean that there would be a bag or two with a gun in it at the event. Odds are, most people at the class won’t know each other and the teacher won’t know most of them, either.
His get out of trouble solution wasn’t well thought through, but I figure he picked that day and location as a “target-rich environment”.