Politicians know the electoral college decides the election. If the candidates had been campaigning for the popular vote, presumably Trump would campaign harder for more votes in large states like California and New York.
That is a benefit of certain aspects of our political system, but not the electoral college. The electoral college only serves to introduce bizarre volatility into the elections.