To me the difference is just a technicality. My point is you’re not getting taught by who you’re paying for.
Only ignorant people think that all beginning courses are taught by real professors. That hasn't been true for generations.
Grad students' assistantships often require them to teach classes. It's not "a way to build favor with the professor," it's required for them to stay in grad school.
As for whether they're "random" or not: how would you know how they assign classes? I doubt it's by lottery.