The stated goal of this policy is to help regulate a fair balance of political power and representation among the states. More specifically, it was implemented with the intent to make sure the political will of smaller states was not overlooked and made irrelevant. It does this by giving a little more mathematical-political weight to smaller states than they would have if the presidential election process was carried out via a straight popular vote. In effect, this gives an arguably unfair political advantage to the conservatives of the country as more conservatives tend to reside in rural and small-town areas.
It balances the popular vote, without it LA county alone could outvote Montana, Wyoming, and most of Idaho if it were left to a national popular vote. The popular vote in your district determines how your college electorate represents how their district voted, this lets less dense areas have the same voting power as high-density areas, it helps balance things. It’s not perfect, there’s a thing call Gerrymandering, which politicians restructure the districts to manipulate how to vote balances and can effectively cheat, but that gets complicated pretty quickly.