There is a limitation is Mysql that it only assign certain length to CHAR variable which is known as PAD_CHAR_TO_FULL_LENGTH. This PAD_CHAR_TO_FULL_LENGTH limitation doesnot implies on VARCHAR Variable. Due to this limitation, When CHAR values are retrieved, trailing spaces are removed unless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled
And to enable PAD_CHAR_TO_FULL_LENGTH SQL mode, execute a plain old SQL command along the following line
SET SESSION sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';
Now you should be aware that why varchar donot trail white spaces. It is because there is no such PAD_CHAR_TO_FULL_LENGTH limitation on varchar variable.