How can one plan a class?....you never know who is going show up. A plan would ruin the moment presented by the circumstances.
I must disagree. It has become quite clear to me over the years that a lesson plan that typically consists of "whatever sensei decides to teach tonight, depending on who shows up," is a primary contributing factor to the problem of "never know(ing) who is going [to] show up. A reasonably structured curriculum gives students a reasonable degree of assurance that they aren't wasting their genuinely valuable time on whatever sensei pulled out of the black box five minutes after class started.
One can always set a plan aside or use it as a basis for something more extemporaneous, as circumstances demand, if there is a higher goal to be achieved than the mere delivery of one block of material (be it basic, intermediate, or advanced). And yes, one will often have to adjust on the fly.
Even so, the regular need to adjust on the fly is not a valid reason not to plan, it's just a lazy excuse. That many senior shihan in multiple lines of aikido have used this lazy excuse to justify their own failure to deliver competent basic instruction for decades doesn't change that.