It came out of the war that tore America apart.
On May 5, 1868, General John A. Logan, leader of an organization for Northern Civil War veterans, called for a nationwide day of remembrance later that month. “The 30th of May, 1868, is designated for the purpose of strewing with flowers, or otherwise decorating the graves of comrades who died in defense of their country during the late rebellion, and whose bodies now lie in almost every city, village and hamlet churchyard in the land,” he proclaimed. Source: History.com
May 30 was chosen by Logan because it was not the anniversary of any battle; it could be used to celebrate the peace, and those who died.