Why is there pink spotting 10 days before your period?

so that you can know when you start it's you bodys own little way of telling you "you start in ten days"