The short explanation is native GUI apps that use the macOS frameworks use the classic macOS directory structure.
The classic Unix utilities and apps typically use $HOME on macOS, while their modern, often Rust-based replacements—WezTerm, Exa, fd, broot, Fish, etc.—use XDG.
Vim uses ~/.vimrc while Neovim uses XDG.