Sometimes you just can't get a stake in the ground. Sometimes a stake just won't hold. Maybe you ran out of stakes or lost them.
That's when this trick comes in handy. Take some of that elastic cord ( or even regular cordage will work) and loop it around a rock, log, picnic table leg, low branch.