When something unfortunate or something that we don't plan for happens... we use that expression. For instance, a wind storm came through and blew a board off the side of my house; then I would likely say, "Well, that is just the price of life." Price is equal to cost.