The starting year — 1897 — is not arbitrary. It is roughly when continuous, comparable U.S. economic data starts to exist.
Charles Dow first calculated the Dow Jones Industrial Average on May 26, 1896, as an average of twelve industrial stocks at $40.94. The U.S. Bureau of Labor Statistics began collecting family expenditure data in 1917 and published the first national Consumer Price Index in 1921, with retroactive estimates back to 1913. The U.S. Border Patrol was established by Congress on May 28, 1924, as part of the Labor Appropriation Act; recordkeeping on southwest border encounters has been continuous since.
Egg and gasoline price tracking are newer — the BLS retail egg series and the EIA gasoline series both come into useful continuous coverage in the 1970s and 1980s — which is why those lines on the chart begin later than the Dow line.