If spaces are explicitly inserted, they are stored.
So if you...
insert into SomeTable (Varchar50Field1) values ('Hello ')
The spaces WILL be inserted. If you have trailing spaces in a varchar field, they were inserted as such and are not related to the storage engine. Perhaps somewhere along the line the data was contained in a char(50) variable.