Attending class for a few weeks before registering in it is common too. This is not really related to payment, but gives a chance to sample courses before commiting. Class size is usually less of a problem in grad school and they will make space for whoever is interested so there's not really a need to register and reserve a spot like undergrad classes. They might not even care if the people showing up aren't registered anyway. This is from a math perspective, math students don't take up much space. It might be different if the course has a limited number of lab equipment available, or the students are better nourished.
The lump sum, I mean you pay say $X per year in 'tuition', and this is completely independent on the number of classes you take, the phd student taking 3 or 4 classes to fullfill requirements is paying the same as the final year one who is taking none.
Again, this can all vary by institution.