I'm not an immunologist or even a biologist, but: biological lifeforms are complex things that don't really work in absolutes, but in shades of gray. Having antibodies and so on is not an absolute protection from reinfection, but rather helps fight it. If there aren't enough of them, or in various other circumstances (suppressed immune system, different virus variant, etc), it seems only natural that it is possible to be infected again.
The long tail of the distribution combined with the media’s search for interesting stories ensures that unlikely events will be featured more prominently in your observations of the world than they would deserve according to their probability alone.
> But then how does this explain that some people got covid twice?
DNA is really diverse and it will never be the case that _everyone_ responds identically to external stimuli. This is the problem with the "one size fits all" approach to drug and biologics development.