Pros and Cons of Enrolling in coursework units during a PhD
I don't know how lecturers are paid in your education system.  In most cases, pay does not depend on number of students.  You are probably right that the lecturer doesn't have a direct financial interest in whether you attend or not.

However, it sounds like your institution has an interest - they get paid more if you enroll in the class.  There is a good chance that the institution's rules require that you enroll in order to take it, and if so it is probably the lecturer's job to enforce it.

If you are not sure of the rules, you could ask a lecturer whether it is allowed to sit in on the class without enrolling.  If you know it is not allowed, you should not ask to do it - you put the lecturer in an uncomfortable position, and they can get in trouble if the administration finds out they gave permission.

Many universities allow an "audit" status which allows you to attend the lectures, but does not require you to do any of the assigned work.  If that's what you're looking for, you might try to find out whether that is an option for you.