Delusion is a mind’s reaction t0 an extremely stressful state. It offers an escape from the ugly world the mentally ill person sees. Instead of a broken, pitiful person, they jump in the opposite direction and start having delusions of grandeur.
Don’t be so sure you’re above it yourself. Everybody believes things about themselves that wouldn’t stand up to strict scrutiny. Believing you’re Jesus is just a matter of degree, not kind.