It’s no secret that Google’s algorithm prefers high-quality links to your site as a sign of your expertise and trustworthiness.
On the flip side, you will do plenty of damage to your rankings by having a bundle of links from spammy sites.
Link building involves a tremendous amount of work and know-how to be effective. Considering the link algorithms of most search engines are a mystery, it requires constant maintenance.