Could it be that the devs who write that code are not allowed to touch the CSS so they implement the visual functionality they want in their framework instead of telling the design team their intent?
That person should sit alone in a room with no distractions and think about what they did.