It is easy to see why burglary might not have been an attractive charge here. The offence of burglary is defined in the Theft Act 1968 s.9. Basically it requires entering any building or part of any building with intent to steal (or commit other crimes identified in s.9 subsection 2). Climbing a wall to an enclosed back yard would satisfy the first part of this definition; the problem would be with proving an intent to steal. There are two issues here. First, the prosecution would have to prove that property belonging to another had been taken (s.5), and then they would have to prove that it had been done with a dishonest intention (s.2).
The problem with the first of these is that it can clearly be argued that property which has been thrown out no longer belongs to anyone - or that the fact that it is in a bin is at least prima facie evidence of an intention to discard the property. So the prosecution would have to prove that the food was under the possession or control of the owner. If the food had been contained in streetside bins that were accessible to the public this would surely be impossible; if they were in an enclosed yard then possession or control might be easier to establish as they would not pass out the the supermarket's control until the contents of the bins were physically removed.
However, even if this test were met, it would be difficult to establish dishonesty. It is just conceivable that the prosecution could satisfy the legal test - set out in s.2 of the Act and in the case of Ghosh). This is basically a matter of whether you understood that it would be dishonest or wrong by common standards, even if you believed your condct was right or justifiable. However, if the food were removed because of hunger, or even as a protest against supermarket practices of discarding food which could still be consumed, this would at the very least require the court to engage in a discussion of the legitimacy of such practices and the justifiability of the motives of the defendants. And if went to a jury, as would probably happen, then there is authority that dishonesty is a matter of community standards and it is quite possible that a jury would be willing to acquit.
So we can see why burglary would be difficult to prove. But the Vagrancy Act 1824? The long title of the Act gives a flavour or its style and scope:
An Act for the Punishment of idle and disorderly Persons, and Rogues and Vagabonds, in that Part of Great Britain called EnglandMost of the Act has now been repealed. It was notorious in the 1970s and 1980s as the basis for the so-called 'sus laws' - powers to stop and search which were used disproportionately against the black community. Remaining powers include that of the Crown Court to commit any "incorrigible rogue" to prison (s.10), and a general power under s.3 to imprison chapmen, pedlars, prostitutes, beggars and others deemed idle and disorderly persons. (I'm not making this up - you can read it here).
It would appear that the charge would be under s.4 of the Act. This is basically a long list of undesirable conduct, but includes the phrase "every person being found in or upon any dwelling house, warehouse, coach-house, stable, or outhouse, or in any inclosed yard, garden, or area, for any unlawful purpose" (a form of criminal trespass). An offender will be deemed a rogue and a vagabond and may be committed to a house of correction for up to 3 months.
Leaving aside the question of whether there are any houses of correction anymore (we call them prisons these days), this is all very bizarre. The Act is nearly 200 years old, and nothing about it suggests that it is appropriate to our times. If the problem is with the unauthorised entering of the yard then this should either be recriminalised as a specific offence, or probably more appropriately deal with by non-criminal means - speaking to the offenders, or making discarded food available in some other place or giving it to food banks. This is a disproportionate response and it is hard to what what public interest there might be in prosecution.