Ideally builds and deployments are different.
Bench assumes you’ve a vm and redis is always connected.
Crashing frontend - #2 by revant_one check this how it needs redis cache during builds.
Even frappe/press assumes everyone will get a localhost redis always connected.