Why doesn't the 'rm' command dump file in Trash?
rm is a standard Unix command and Unix does not always have trash. At the programming level the BSD API does not have a system call to trash a file, Apple supplies those at a higher level.

Also  you need a command that deletes files e.g. to remove them from trash and rm happens to be it. You need another command to put a file in trash.