Well, "why such behaviour is good" is stretching it. Maybe just "why such behaviour is"?
What is shown here is just a rare edge case that you should not normally encounter.
But I think that == has some other behaviors which are really detrimental. Like 0 == 'hallo world'. Sadly those can't be fixed due to backwards compatibility.