Apple restricts certain actions and websites from devices. When you jailbreak your device, it can freely install and uninstall apps without restrictions from the iOS. This method removes all restrictions, including MDM locks. So yes, Jailbreaking your device can help bypass MDM, but this device leaves your device very vulnerable to viruses, so it is not a safe and recommended method.