The man in question was Andrew Banks (28) from Stansted, Essex. He was charged with the common law offence of outraging public decency and was sentenced to 14 days imprisonment when he appeared at Westminster Magistrates' Court and entered a guilty plea.
The BBC report tells us that
Banks is a Tottenham Hotspur fan (irrelevant to the offence), that he had travelled to London with others to "protect statues" but did not know which statues. He was said to have drunk 16 pints during Friday evening to Saturday morning and had not been to sleep. The report also notes that Banks contacted the :Police after being confronted by his father. His counsel told Chief Magistrates Emma Arbuthnot that Banks was ashamed of his actions and "had mental health issues."
The sentence of imprisonment was welcomed in some quarters. For ecample, by Tobias Ellwood MP who had given first aid to PC Palmer as he lay dying in the grounds of Parliament.
Outraging public decency:
Outraging public decency is a common law offence, and was formerly regarded as one form of public nuisance. It is triable either-way and, if tried in the Crown Court, the sentence is "at large" - i.e. any appropriate term of imprisonment (immediate or suspended), a community sentence or a fine. The offence can consist of any act or display fulfilling the following conditions:
(1) it must be lewd, obscene or disgusting to such an extent as to outrage minimum standards of public decency as judged by the jury (or other tribunal of fact) in contemporary society;
(2) it must occur in a place which is accessible to or within view of the public; and
(3) two or more persons must be present during the act or display, whether or not they are aware of the act or display or are outraged by it.
The offence has been used to deal with a wide rage of conduct such as: indecent exposure, masturbating or other sexual activities (real or simulated) in public, publishing a magazine with contact advertisements for gay men, intimate filming of women without their consent, exhibiting a sculpture consisting of a human head with freeze-dried human foetuses as earrings, nude bathing in inhabited areas, disinterring a corpse for dissection, indecent pay-per-view exhibitions, exhibiting a picture of sores, procuring girls to be prostitutes and urinating on a war memorial
Some cases on this offence are: Hamilton  EWCA Crim 2062 and Rose v DPP  EWHC 852 (Admin).
In Hamilton the offence was trundled out to deal with "upskirting". Today, that could be dealt with by the Sexual Offences Act 2003 section 67A (in force from 12 April 2019).
Rose was a case where oral sex took place in the foyer of a bank to which access was available using a swipe card. The bank manageress, as part of her duty, viewed the CCTV when the bank opened the following day. The man was convicted in the Magistrates' Court (Deputy District Judge Pascoe) but the High Court quashed the conviction because, as a matter of law, there was no offence where only one person saw or could have seen the act complained of.
In 2015, the Law Commission recommended that the offence of outraging public decency be abolished and replaced by a statutory offence - see their 2015 Report.
Andrew Banks - sentencing:
Banks' action was, to say the least, unpleasant and capable of causing offence. It took place in a public place (just to the right of PC Palmer's memorial) where others could (and did) see what he was doing. Banks can be taken to have accepted, by his guilty plea, that his conduct had outraged public decency.
The judge had a choice in sentencing - imprisonment (immediate or suspended), community sentence or a fine. The aims of sentencing are set out in the Criminal Justice Act 2003 s.142 -
(a) the punishment of offenders,
(b) the reduction of crime (including its reduction by deterrence),
(c) the reform and rehabilitation of offenders,
(d) the protection of the public, and
(e) the making of reparation by offenders to persons affected by their offences.
The court must not pass a custodial sentence unless it is of the opinion that the offence, or the combination of the offence and one or more offences associated with it, was so serious that neither a fine alone nor a community sentence can be justified for the offence - section 152.
Under section 153 a custodial sentence must be for the shortest term (not exceeding the permitted maximum) that in the opinion of the court is commensurate with the seriousness of the offence, or the combination of the offence and one or more offences associated with it.
When Banks is released he will be subject to supervision for 12 months - Criminal Justice Act 2003 section 256AA.
A Suspended Sentence Order would have been possible and an unpaid work requirement could have been added.
New Law Journal - Criminal Law - Outraging Public Decency