Some learning management systems have a quiz setting that causes this behavior. In Blackboard, the setting is called "Forced Completion". In Brightspace, the setting is called "Auto-Submit Attempt."
If there is ever an interruption in the internet connection during the exam, these "Forced Completion" settings automatically submit the exam. This same behavior can occur if you click on the "Refresh" icon in the LockDown Browser toolbar.