I had set do not disturb mode on my iPhone and also set allow calls only from favourite and yet the phone rang, why?

That number wasn't on my contact hence an unknown number.
Why does this happen?

Yarry yarry yarra

Did you set it up so that it would also ignore repeated calls?

Because iPhones suck.

Because it's an iPhone.