The definition of complementary color is "a color on the opposite side of a color wheel (geometry) that cancels the other making the resulting one neutral (achromatic, grayscale), black or white".
I added a couple of words in parenthesis. Not every color model is a wheel, a circle. You could represent them in a hexagon, rectangle, or triangle. In fact, they are not 2D shapes, but 3D solids.
And if you think of the "opposite" on a 3D solid, you do not get white or black, but grayscale. You can have cubes, cones, double cones, cylinders, spheres, or potato-shaped 3D models.
Take a look at this question: Is there a standard for color wheels?
Let us stick to color wheels, well, we do not have only one "color wheel". Yes, we have the more standardized RGB-CMY color wheel, and numerically you use that model when you use hexadecimal notation and operations.
But a color wheel that stays on an "artistic level" is RYB one. In this wheel, Yellow is opposite to Purple. It does not make sense mathematically, only perceptually. It is the standard color wheel used in painting.
My assumption is that the person doing that color scheme used something like: https://paletton.com/#uid=a1S4G0k++NyttZOLy+V+WuJ+5ob
And as you can see, that is more or less an RYB model.