//That's not unusual when they plead guilty in magistrates' court//
It is fairly unusual these days.
Before imposing an immediate custodial sentence, magistrates should first order a "pre-sentence report" from the probation service. This report would provide detailed information about the offender and the offence, the probation officer's comments on the various sentencing options available to the Magistrates (the Bench having given their likely disposal) and their suitability. Up to about ten years ago, these reports would be prepared away from the court and the offender remanded (either on bail or in custody as appropriate) to return at a later date for sentencing. This was changed in about 2010/11 and the probation officers present in court were empowered to interview the offender and report back to the court later the same day. This worked well (leaving aside the period when Chris "Failing" Grayling was Justice Secretary and he made a botched attempt to privatise the Probation Service). But like every other front line government department, the service has been cut to the bone and probation officers are not always present in court to prepare reports.
Of course we don't know all the facts, but it could be that either there was a probation officer present to prepare a report or the offender may have had a recent report prepared on him for another offence. Either that or the Magistrates thought that nothing a report would tell them would influence their sentencing decision. In any case he'll be out in six weeks.