Why Machines Learn (The Elegant Math Behind Modern AI)