The pilots do not need to be on the airplane for boarding...only the FA's do. The pilots just have to get all their prep done prior to departure (obviously), but FAR's state how many FAs must be onboard when there are pax's on the plane.
As to why the CA did what he did, I have no idea. However, it might not have just been a hot cabin but something related or something else entirely. I had an aircraft once that developed a leak in the ducting that maintenance told us was a hazard and that we had to deplane to keep the pax's safe. There are many reasons why...but then again, he could have been a kook, lol.