sha1 and md5 are both based on the same idea. To each and every string there is an n-character hexadecimal number which represent it. There is a table (hash table) which tells how to match a string and a number. Though there can be two strings with the same value, it's rarely ever matters in this encodings.
In md5 encoding there are 32 hexadecimal characters that represent a string and in sha1 there are 40 characters. As you see, there is less chance to find another string with the same hash-code as an encoded string if you have more characters.
Hence, the more - the merrier.