A dynamical system with generalised particle position $q$ and generalised momentum $p$, described by:
$$\dot{q}=F_1(q,p)\quad\text{and}\quad\dot{p}=F_2(q,p)\tag{1}$$
is a Hamiltonian system if:
$$\frac{\partial F_1}{\partial q} + \frac{\partial F_2}{\partial p} = 0\tag{2}.$$
But from Hamilton's equations: $$\frac{\partial H}{\partial q} = -\dot{p} = -F_2\tag{3}$$ and $$\frac{\partial H}{\partial p} = \dot{q} = F_1.\tag{4}$$
This gives the condition for a Hamiltonian dynamical system as: $$\frac{\partial^2 H}{\partial q \partial p} = \frac{\partial^2 H}{\partial p \partial q}.\tag{5}$$
Why is the symmetry of the second partial derivatives of the Hamiltonian function a necessary condition? What are the properties of a function $F$ for which $\frac{\partial^2 F}{\partial q \partial p} \neq \frac{\partial^2 F}{\partial p \partial q}$ in the context of Hamiltonian mechanics? And what physical property of the Hamiltonian does the symmetry condition highlight (in terms of the physical intuition of the total energy of a system, for example)?