Presuming you're using Excel to create the CSV files.
This is to do with Excel, which has a concept of "last used cell".
Basically by clicking into an empty cell that is past where your actual data is, Excel sets that to be the new 'last used cell'.
When you then save the sheet as a CSV, Excel will append empty rows/columns to reach what it thinks is the complete spreadsheet