I say it’s at the pleasure of the teacher. In some courses, it’s not necessary... some classes are online and there IS no attendance.
I say, if you want a good grade, first thing you need to do is attend lecture. Second, read the text. Third, do ALL the homework. Fourth, get with others for study groups. Do these things and it’s hard NOT to do well.
bttt