I love this question!
I teach Chemistry at various levels and this concept around ATP hydrolysis causes more issues for my students than any other. Often, this is the first time that a student meets a concrete example of bonding (in a Biology class) and they so often walk away with the wrong idea about the processes of bond forming and breaking.
Breaking a bond, in isolation, never releases energy. Bonding is a stable state compared to the unbonded species, where opposite charges are closer together when bonded compared to unbonded and the whole system is at a lower (electrical) potential energy. The bond broken in the hydrolysis of ATP is no different. It is a fairly weak bond, but still requires energy to be broken.
The reason there is energy released in the process is because the products formed (ADP and hydrogenphosphate/phosphate) have stronger covalent bonds (plus intermolecular forces with the surrounding solution and dissolved ions) than the starting materials. This is the case for any exothermic process. As you break the P-O bond in ATP a new P-O bond is formed in the hydrogenphosphate, but you also need to look at the interactions of the starting materials compared to the products with the solution. We should also note that the water that attacks the phosphate group in the hydrolysis reaction will then need to be deprotonated and the hydrogenphosphate ion formed will partially dissociate to phosphate, so there's a lot going on!
Also, it is worth noting that when people say "energy is released in ATP hydrolysis" they are normally referring to Gibbs Free Energy, which also includes the contribution made by the system entropy change (times temperature) as well as the enthalpy change (determined by bond and other electrostatic interaction strength). In the case of ATP hydrolysis, under most conditions, we also have an increase in the entropy of the system and this drives the process to be even more exergonic (favorable, can be used to drive other processes) than the enthalpy alone would suggest.
Please understand: the chemistry involved here is actually very complex and the total usable energy made available depends on many factors beyond the structures of the starting materials and the products. To truly understand ATP hydrolysis requires knowledge of all species' concentrations (as this affects the driving force) including various dissolved ionic species that aren't normally included in the simple reaction equation.
To answer your last part, bond formation from isolated species always releases energy as opposite charges are getting closer together and potential energy is decreasing.