It is not surprising that many universities allow non-matriculated students to attend (paying tuition) in classes where there is otherwise-unused space available after matriculated students have enrolled.
For example, you can see which upper division math classes at Berkeley have space, so that they could possibly be options for a non-matriculated student: