Could you have different collation on the two tables?
Regardless you should never have different types/sizes of the columns part of the join condition ( and in your case you have VARCHAR(15) and VARCHAR(12) ).
The reason is that you are forcing implicit conversions(or explicit in your case with TRIM()) to happen and when performing these in a join condition you can end up in a lot of conversions which slows down the execution of the queries a lot.
I assume he is storing numerical values such as ‘0001234’ in a varchar column. You can not easily remove trailing zeros in a string without converting the value to a number (which happens when multiplying by 1).
I don’t know why this is posted in a forum on performance.