This expression means that there is no use in getting upset over something that has already happened and cannot be changed. It advises letting go of past mistakes or mishaps and moving forward positively.
I cried when my Mother swatted me for spilling my milk. Origins are most likely sprang from faery lore. It was thought, to attract faeries and their blessing or good luck to a house, laying out a "shrine" with food brought favour to the house. Whenever milk s spilled, it was considered the offering was discounted and wasting the food also added to the difficultly in feeding a family.