The WCAG calculations for contrast are complete rubbish, in my experience they don't reflect reality very well at all. I haven't been able to figure out why though, each of the individual steps looks reasonable.
The main issue is that they linearise the sRGB colour space before adding together the components… and then never 'delinearise' it afterwards. Human brightness perception is non-linear and WCAG totally ignores it.
This is a collection of 'even' black-white gradients in different colour spaces.
That 0.150 purple on white is painful to look at, but the .548 yellow on pale grey is mostly fine... and why darken it all the way to the colour of, ahem, an infant's surprise?