Google doesn't reveal exactly how its algorithm works, it's puzzling. All I know is that it gives value to sites with quality contents, good onpage SEO factors and quality backlinks.