The answer is:
(1) who had the name first
(2) whether there would be confusion in the market as to which company was which
(3) whether the name was so well known that it would instantly be associated with one of the companies
who first had the name need to be considered in order to obtain legal ownership of the domain. Finding out whether the name is already familiar in the market is being done in order to ensure that company's effort is not falsely accredited to another company.