Personally I'm fine when macOS port is not doing exact the same as Linux version is doing. But even on macOS I think such things should go to .profile -- using .bashrc or .zshrc is just not the correct level.
Maybe I miss something but why is .bashrc or .zshrc not the correct level?