Why extra spaces cause problems
“London” and “London ” look the same on screen but are different values to a computer. Trailing spaces make VLOOKUP and XLOOKUP fail, split one category into two in pivot tables and create duplicate contacts when you import into a CRM. Trimming every cell before you import or analyze data prevents all of that.
Spaces you cannot see
Data copied from websites, PDFs or Word often contains non-breaking spaces (U+00A0) and zero-width characters. Excel's TRIM function does not remove them. Remove invisible characters turns non-breaking and other unusual spaces into normal spaces and deletes zero-width and control characters, so the trim that follows catches everything.
What is not changed
Single spaces between words are kept; only runs of two or more become one. Line breaks inside cells are kept unless you choose to remove them, and header names are left alone unless you pick a header style in the Columns section.