When you use /attribute @s minecraft:whatever base set, you can set it to values much greater than maximum possible value for that attribute.
How to reproduce
Run /attribute @s minecraft:generic.max_health base set 1000000 (the limit for health attribute is 1024). The command will be succesfully executed
Bring the player to full health
Use /data get entity @s Health, the value will never exceed 1024 because of the build in health limit
Expected behavior
The game should tell you that the value is too large instead of letting you run the command.
Confirmed in 1.20.4 and 24w06a.