Lecturers get about $2-10 in royalties on each book sold. But let's go with $10.
Now, let's suppose that it's a massive first-year unit. The largest at Monash are about 800 students.
So at most, our lecturer can make $8000 out of prescribing their own textbook. And that's assuming a massive first-year core unit, no more than one co-author, and every single student buying the textbook, and getting it new.
Writing a book is really hard work. It takes up considerable time. Publication of an article in a journal can be worth some thousands of dollars for each year after publication, as an alternative to writing the textbook.
Furthermore, textbooks usually don't make any money (and thus are not likely to come to print) unless there is demand for them from several institutions. They'd have written it independently of their ability to prescribe it. And in the large scheme of things, prescribing it would only represent a fraction of what they'd make out of it.
Bottom-line: There may be a conflict-of-interest, but for the most part, the money lecturers make out of writing and prescribing their own textbooks is minor. It's unlikely to be some grand conspiracy to deprive you of your money; rather, they likely would have written it anyway and decided to prescribe it since they are familiar with it.
Oh, and there can be numerous advantages of the lecturer writing the material.