The reason why is that old code together with new (all code considered for MR) fulfill required coverage percentage, whereas new code alone doesn’t, hence failing for main branch.
e.g. file contains existing 90 lines with 100% coverage, 10 lines are added with 0% coverage.
MR: New code considered: 100 lines - Coverage on new code 90%
Main branch: New code considered: 10 lines - Coverage on new code 0%