The bug
The bogged skeleton variant can spawn underground. This is different from the behaviour of other biome-dependent hostile mob variants, such as strays and husks.
Steps to reproduce
Go to a mangrove swamp
Wait a moment
Run the command /effect give @e[type=bogged] glowing
See the bogged spawn underground
Additional information
This may be intentional as there is little open surface in the swamps compared to deserts and frozen plains, however in that case their rates could be drastically increased in mangrove swamps to compensate.
Does MC-268574 describe your issue?