AI coding agents work best when they have guardrails to keep their code sane and a signal to measure improvement against. Unit tests, linting, etc are cheap signals to keep the AI coding agent in check. Also side benefit of producing a unit test suite that catches regressions.