Some professors have a lot of knowledge and want to share it. Other professors have a lot of knowledge and want to prove they're geniuses because almost none of their students can grasp the impossibly complex material. An insecure professor is a nightmare in basically any setting.