Because the story needed him to. That is the honest answer.
Broly's power is written to be enormous, but the films still have to end with the heroes surviving — otherwise there is no Dragon Ball left to tell. Defeating him in a way that exceeds his established strength is a consequence of that requirement rather than a considered rule about his limits.
It is one of the more commonly cited inconsistencies in his characterisation, and the fan explanation is usually some variation of "the sun is a special case." The production reason is simpler.