Yes, this is how textbook manufactures sell to university. One time codes for online exercises / labs. This happens mostly for intro classes. I have no idea why universities do this, my guess is they are sold on hw problems being randomized so it makes cheating more difficult.