Teaching is about moving our knowledge (the stuff we’ve collectively learned ourselves, from others and our parents [instead of everyone needing to find out on their own]) to the next generation. While some skills may become obsolete in some parts of professional life due to AI, the purpose of academia does not change much.