splitting your code up does several things: -
It modularises your code so you can isolate sections. I.e. have separate files for things like UART, SPI, I2C for example. This also allows you to have private variables in each module, which can also reduce unwanted interactions between parts of your code.
By separating the code out into separate files only the file you are currently changing needs to be compiled before it gets linked with the other files, giving faster compile times, especially if the compiler can use multiple threads if you change several files. If everything is in one large file then the whole file has to be compiled each time.
With separate files error messages can include the file name so you know which module to look in to find the problem, rather than paging through a horrendously large file.