Testing the public API is crucial as it ensures the most critical and user-facing aspects of the software are robust and reliable. This approach helps maintain compatibility over time, even through major codebase rewrites.