I don't think that's a macOS bug. Your terminal emulation might be borked.
What terminal are you using? I just tested on Terminal.app and iTerm2.app -- `man fopen` looks correct on both.
The following should be equivalent, but might perform differently for you depending on what part of your config is bad:
cat /usr/share/man/man3/fopen.3 | nroff -man | more