Why did they start playing Australian rules football?

The first match was played in 1859 between Melbourne Grammar school and Scotch College.