The formula used to prove the functionality of magnets can also be used to prove the existence of a theoretical state called a monopolar magnet - positive or negative on both sides. So either monopolar magnets can exist, even if in some esoteric circumstance, or we don’t know why magnets work.