england-and-wales
I think the main reason is that in specific prosecutions such behaviour may not be found to constitute any of those criminal offences. While on the face of it the behaviour is illegal, the court is also obliged to take into account the rights to freedom of expression, of assembly and association, in the Human Rights Act 1998. But a court's injunction sets out in black and white the restrictions on behaviour after considering the human rights aspects of the case, and breach of the order is a contempt of court (not a criminal offence as such, but punishable by imprisonment and/or a fine).
Such injunctions are an additional tool for trying to mitigate or deter the behavior to which you refer and in a sense they are more convenient than criminal prosecutions.
Some considerations and more detail in no particular order:
Standard of proof differences
You mention relevant criminal offences. These necessarily have the criminal 'standard of proof'. The trier of fact (the jury at jury trial; the magistrate or judge at non-jury trial), having considered all the relevant evidence, must be sure the defendant is guilty.
However, the entity seeking an injunction (the claimant) does not need to meet that standard of proof to obtain an injunction that includes restrictions on behaviour. They need only persuade the court there is a real and imminent risk of a civil wrong for which they merit relief, or that there is a serious issue to be tried at a later date for which they merit relief until the conclusion of that trial.
Criminal prosecution delays
For the past two years to the time of writing this answer, circumstances have been such that if there were a criminal trial (which is by no means guaranteed), it may be scheduled months, perhaps even a year or two, in the future. But the claimant (and the wider public) may want relief 'now' and the defendant(s) might be free to continue their behaviour in the meanwhile, the defendant might not be held in custody pending trial.
Due to delays, some defendants have been in custody for several months pending trial and this isn't satisfactory either, particularly if they are innocent: "everyone is entitled to a fair and public hearing within a reasonable time" (article 6 Human Rights Act 1998).
The behaviour may not be found to constitute a criminal offence
In this context, the law providing for the criminal offence must be read 'compatibly' with the human rights legislation - the qualified rights to freedom of expression, to assembly and association. Meaning, is this criminal justice system reponse to that behaviour provided for in law, necessary and proportionate, in pursuit of a legitimate aim, protecting the rights and freedoms of others, and were there no alternative and less restrictive responses?
Now, some of those elements are a definite yes (e.g. trespass to or obstruction of the highway are provided for in law), others may be arguable. But in any case, the police, prosecution and the court (if it gets that far) must consider those things, must do that weighing up - it is not explicitly provided for in the legislation that creates those criminal offences. The courts have not found every protest on a highway to constitute a trespass to (Director of Public Prosecutions v. Jones and Another) or obstruction of a highway (Director of Public Prosecutions (Respondent) v Ziegler and others (Appellants)).
On the other hand, when these claimants seek an injunction the court does that weighing up and may consider alternative, less restrictive approaches (the claimant submits a wishlist, the defendant or court may push back). The court will say "Yes, this is in pursuit of a legitimate aim and necessary to protect the rights and freedoms of the claimant and the wider public, however X is disproportionate, Y is proportionate, the defendants may go in area A but not area B, this time period is disproportionate, that time period is proportionate," and so on.
So the claimant and the police are now armed with that injunction, the claimant will publish it, defendants are aware of its contents and fellow protesters ought to be made aware of it. It's there in black-and-white what is restricted and anyone breaching the injunction could be found guilty of contempt of court (punishable by up to two years in prison and/or unlimited fine or asset seizure; must be proved to the criminal standard).
Example judgments about injunctions including lists of restrictions
Here are some examples from the context that include different kinds of restrictions by court order and the court's weighing up of the competing interests of the claimants, the defendants and the wider public.
Shell UK Oil Products Ltd v Persons Unknown [2022] EWHC 1215 (QB) (20 May 2022) The claimant sought (and succeeded) to maintain an injunction that was granted on an emergency basis, its restrictions set out at para 20, conclusion at para 70.
National Highways Ltd v Heyatawin [2021] EWHC 3078 (QB) - see para 7 for restrictions, the court found some protesters breached the so-called M25 Order and the court ordered their immediate imprisonment (para 66).
National Highways Ltd v Persons unknown (blocking traffic) [2021] EWHC 3081 (QB) (17 November 2021) - the reasons for the decision to not set aside the ex parte interim injunction made by Linden J on 25 October 2021, some restrictions at para 4.
High Speed Two (HS2) Ltd & Anor v Four Categories of Persons Unknown & Ors [2022] EWHC 2360 (KB) (20 September 2022) - restrictions at para 188.