The trideva always tried not to play with the rules which they embodied in the system. They always had a strict notion, to follow the rules. The best example being, whenever any one of them was angry or not happy with how the rules are making things happen and wanted a sudden change, the other two would console the one to not to do the same, as the universe is a string with bodies connected, a small string moved will change how the universe behaves.
Believe me, there is no magic, people ask such things as that is a simple thing to do and in a jiffy it can be done, however powerful you are you cannot restrain the laws created by the trinity, neither the trinity themselves. Everything in every book, we see even the trinity is helpless in many cases, because they always need to find a way to fight the problem where their own laws are not hindered.
Why wasn't Lord Shiva who is so powerful god able to put back the original head of Ganesha? Why was he so helpless?
Coming to Lord Ganesha, there are many rare points which people don't know.
- Ganesha's head was completely destroyed, it wasn't only detached but completely destroyed, no skin left; all burnt to ashes.
- There was an elephant which prayed to Lord Shiva and wanted to be his son, the same elephant gave his head to Lord Shiva, which was put on Ganesha's body.
- Ganesha being only the part of Prakruti (as Ganesha was solely born from Parvati) was not perfect and needed a Purusha part also, by attaching the elephant's head, Lord Shiva completed Ganesha with the Purusha part too.
Why couldn't Parvati create another Ganesha like how she had created earlier?
It's not about new creations, she's a mother, and she had to have a mother's feeling in her. Ganesha being Parvati's son, when he died, it implanted a huge amount of pain and anger in Parvati's heart, this pain cannot be undone, it's a binding of a mother to the child, a universal law, which cannot be ruled out or bluffed. Every mother can give birth to a new child that doesn't mean she should stop lamenting on her dead child, a dead child is like loosing a part of your soul and it can be understood only by a mother, men are feeble creatures in that. Afterwards, Parvati did have another child.
Note : I cannot provide scripture references as I don't remember much. Secondly, my knowledge is limited to things I listened from Gurus and a general logical understanding.