The CD ensures that the code is only deployed after all tests passed, it was approved, merged, and ensures a deploy isn't skipped accidentally. Depending on what your doing it could take a while to fully build new binaries, build for multiple platforms/versions/architectures, etc.
Unless you take great care in writing hermetic tests, testing on your local machine won't catch problems hidden by non-standard versions of libraries and tools in your local development environment (e.g. you installed modern versions of bash and python on your Mac, but your users are using what the OS comes with).
And for large enough projects, running tests on a single machine is simply impractical: a full test suite run on a single machine would take hours; the only solution is to shard.
And you could set up a trigger to build it when you make a commit so that you don't need to manually trigger every machine separately.
And then you don't need CI!
I see this class of issue often in early startups that don’t have robust CI implemented yet. Like literally once a month or more per company.
[1] Unit tests, maybe, but not integration.