What is the purpose of a reference, and can AI write one?

Why we cite sources, what APA, MLA, Chicago and Harvard say a reference is for, what universities say about AI-written references, and how to keep the promise.