The only thing they have in common is "assessing". An exam for a course seeks to assess mastery of the subject matter of the course. An interview for a job seeks to assess skills / aptitude for a particular job.
This.
Moreover, an exam for a course is, to some extent, an assessment on how the course was delivered. And an interview for a job has a much larger scope.