Prior to 2016 there were segregated maths papers for ks1 sats (so for year 2 children).
Generally pretty much every child did the level 2 paper and then some did the level 3 paper.
Old papers are here
www.satspapers.org.uk/Page.aspx?TId=4
It changed in 2016 to the current papers which I believe every child does.
The KS2 sats also had segregated maths papers - so there used to be the normal ones that everyone sat and then a level 6 paper which was for the higher attainers.
www.satspapersguide.co.uk/level-6-sats-papers/
There are vast, vast differences between children in terms of their maths ability. At primary there is a focus on keeping the whole class together and using mixed ability teaching.
Many higher attaining children do get very very bored with this especially in year 2 and year 6 and the "higher" (level 3 and level 6 papers) were to make sure they weren't just being ignored and making no progress.
In theory the new ks1 and ks2 sats are harder so there is no need for this but in practice there's a lot of bored high attainers in year 6 these days still.
In the U.K. secondary is generally the point at which the balance between keeping the whole class together for essentially social and developmental reasons and academic progress tips and although some secondaries have mixed ability in year 7 (usually to help with the transition and also so you are not setting just off ks2 data) most will set after that.
This means that the lower attainers can get the support they need - drop a language etc in the hope they can progress well enough to pass maths and English which are really important.
The higher attainers need much much more challenge and are capable of much more. So top set maths will often do two or three GCSEs in maths - they'll do the normal one at the normal time but add in either stats gcse or further maths gcse both of which help with the transition up to a level.
They can do this in the time that that lower attainers need to get up to pass level at gcse because most higher attainers come into secondary capable of getting a gcse grade 4 or 5 already at foundation gcse because the foundation gcse topics (with a few exceptions) are what is taught in primary.
We spend 5 years basically re teaching the lower attainers the primary maths curriculum again in the hope that this time they will get it.