Spotting 5 days before period is due

I’m curious what could be the reasoning of spotting 5 days before my period is due?

I had a quarter size of brown blood in my underwear on Thursday and my period isnt due until Tuesday. I was really annoyed because I thought my period was starting early which isn’t fair but I haven’t spotted since then.