It helps to comeback from a loss, knockdown or certain defeat. It shows you can handle yourself no matter what happens. Some fighters cherry pick a whole career and think they are the greatest, when they would have lost many times fighting the murderer's row that some great fighters have fought. Hell if most fighter fought the best at every weight class they enter, the 0's in most fighters record would go.
The reason people say Ali, SRR or SRL are the greatest, is because they were underdogs in fights, got knocked down and came back and won when no one thought they could win. Fighters who fight hand-picked over matched opponents only hurt their selves, because after they retire, they will be forgotten. Most people rank Oscar De La Hoya high on the all-time list and he lost most of his big fight, but he always fought the best fighters, even when he had no chance (BHOP).