Claig - I would guess that the haste in going back to Italy was because she wanted to go back, and the doctors treating her at the time (possibly mistakenly) thought she was well enough/had mental capacity to decide to return.
If she had mental capacity to make her own decisions, no one would have had the right to make her stay in the UK against her will. Leaving may well have harmed her case to gain custody of her child, but I presume psychiatrists are not experts on international child custody/care proceedings, so they may not have realised that, and it's not really their business to advise her on that.
Some people seem to be seeing 'the system' or 'the authorities' as one body making decisions on this case, but in fact there are obviously lots of different people and organisations involved in different aspects of a complex case (psychiatrists, ob/gyn departments, social workers, courts, Italian government bodies etc etc), with no one in overall charge.
It sounds like she could have done with some legal advice at various stages, but I'm not sure who should have been responsible for making sure she got it, or paying for it, and given her mental state at the time, she may well not have acted on it anyway.
This whole case is a huge, sad mess, but it is very far from the picture initially presented in the Telegraph story (panic attack leads to enforced c-section in order to put baby up for adoption).