Why would someone lie to see if you care about them

Do they hope that you love them or are they in love with you and want to see ur reaction so this person told me they were leaving even though they weren’t just to see my reaction why ???