Yeah, I had to buy one or two really shitty homemade-looking books the prof wrote. On the other side, I had professors that wrote their own curriculum and did their best to enjoy we didn't waste money on unnecessary books.
My experience was different. I bought them in college whenever possible and none of the professors cared. Often they were exactly the same content, although sometimes the questions differed. Probably varies by institution.