They all stay because they want a treat and they usually get one for standing on the table. Since my dogs are show dogs I reward them for being on the grooming table so they learn to like it and relax on the table when they are at a show. It does mean that when I take the table out to work with a specific dog they all want their own turn on the table. I took a break from shows while we were raising the puppies so it has been awhile since I have had the table out. They were all so excited about having a chance at a treat they all climbed up on it.
In general, my dogs all get very excited about the opportunity to work. On obedience and agility nights they wag their tails, wiggle, and barroo about getting to go to class. Truly, it is easy for me to stay motivated about going to class with them always so joyous about the opportunity. It does not mean they are the best behaved when they get there but they do want to be there.