probably it is the quality of the backlinks. even though the first site has 500k+ backlinks, they could be spammy. also, yes, links are still considered to be the most important ranking factor, but there are still other ranking factors that search engines measure. read this post for a breakdown http://moz.com/blog/ranking-factors-2013