First and foremost, an iPhone cannot be hacked. The only way is jail breaking where your iPhone must physically be in the hands of the hacker. Hacking also requires lots of money and expertise, which is why they don't target the average person, but rather high status people. Also if someone were to hack your iPhone, they would be going for your personal information, credit card numbers, etc. Not to turn off a Focus in place, that doesn't do much for them.
A possible reason for Do Not Disturb automatically turning on could be because of a Focus Schedule or Focus Smart Activation. With a Schedule it will automatically turn on a Focus at a specific time or location or when you open a specific app. With Smart Activation your iPhone will use on-device intelligence to determine when a Focus should be on.