The psets are graded by the same check50 automated grading program. Because there are thousands of students taking this class online, this is the only way to do this. CS50x staff do not look at the submitted programs.
The check50 program expects exact output from the programs submitted. Anything missing or anything extra, including spaces, line feeds or altered text causes the test to fail - it's that simple.
This also teaches another lesson, even though it is never discussed. While you may think that your change is an improvement, it is an unauthorized change to the program specification. Customers generally don't like surprises like unauthorized changes. The lesson here is to write programs to the exact specification of the program, nothing more and nothing less. In the future, you'll be able to discuss improvements with customers and employers and get their approvals as part of the design process. Hopefully, you'll learn to get them approved before making the changes, but that's not part of this class.
In short, you need to write your code to meet the specification. CHECK50 has worked for thousands of students and this is what makes classes like this both possible and free.