The difference in popular vote can be attributed entirely to California and NY.  It is a perfect demonstration as to why the Electoral College was created.  Namely so no two or three population concentrations can control the entire nation.  The amazing part of your observation is that the most obviously gerrymandered State in the Union is California, which has been under Democrat control for well over two decades (i.e., two rounds of re-redistricting).  Additionally, even the MSM estimated that about 4.5 million illegal aliens likely voted in California.