For those who came in late, here is the Counter-Terrorism and Security Act 2015.
http://www.legislation.gov.uk/ukpga/...ent%2525253Dni
Under Part 1 Chapter 2 Section 6, it specifically allows the Secretary of State to impose conditions on a Permit to Return -- requiring the subject to attend an interview with a constable or immigration officer -- and to refuse the permit, denying entry to the UK, if the subject does not attend.
Under Part 5 Chapter 2 Section 36, the subject, once under UK law, if deemed 'vulnerable to being drawn into terrorism' -- like by giving daft interviews pledging allegiance to the ideology of IS and saying severed heads in a bin are no biggie if the heads belonged to 'enemies of Islam,' for instance -- can be referred by a chief officer of police to a local-authority 'support panel' who can 'prepare a plan' for the subject's support and supervision. (The Act only mentions the intelligence services in regard to the fact that support panels cannot disclose information relating to the intelligence services.)
In addition, the subject's movements can be restricted and separate legislation could dictate whether she could keep her child. Begum seems to be aware of all this.
It's nothing to do with 'security services breaking the law.' It's to do with the Secretary of State and the police exercising their due rights and powers under the Act.