As someone who has written name matching algorithms for looking up things in airline reservations systems (not for Air Canada systems), I can confirm that there are very convoluted and tricky things done to try and maximize accuracy given the huge array of "in the wild" data entry for names that airlines see as input from various channels (agents, GDS, governments, home users, batch transfers, etc.)
It is quite possible that the trailing M stripping is just something gone amok in Air Canada's system in this area.
Name matching is a fun algorithm when you have gender and title prefixes, title and honorific suffixes, patronymics and the like, randomly particled names (de la, van der, del, etc.) Problems with nicknames is less prevalent since SecureFlight requiring names and passports matching. Not to mention any name with accented vowels where the data was not entered according to ICAO mapping standards.