It’s an idea that’s been taken from bodybuilders, we don’t really need them. They’re actively trying to increase their calorie intake to build muscle whereas we’re trying to remain in deficit to lose fat.
I’d encourage you not to restrict anything from your diet as you’ll end up in the situation you’re currently in whereby you’re craving “bad food”. No food is bad food, too much of any food is bad for you.
Build a relationship with food that allows you to eat what you want, within reason, provided it fits into your calorie limit and forms part of a balanced diet.
For me, I used to embrace cheat days, but I don’t really bother with them any more. They made me feel like shit that evening and for the days following and often interfered with my weight loss.