You could do man -w and see where the man looks for manpages.
This issue (duplication of results while using man -k printf) arises, if your system has copies of manpages in multiple path.
In my system there are multiple man paths. See below the output of my man -w.
/usr/local/opt/w3m/share/man/de:/usr/local/opt/w3m/share/man:/usr/local/opt/binutils/share/man:/Users/xx/opt/anaconda3/share/man:/usr/local/share/man/de:/usr/local/share/man:/usr/share/man:/Library/TeX/texbin/man:/opt/X11/share/man:/Library/Apple/usr/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man
Out of this, below two has some of the manpages replicated. For example printf can be found in both path.
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/
/usr/share/man/
If you do ls -l in the MANPATH, you will see that both has copies of some of the same manpages.
> ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man/
man1 man2 man3 man4 man5 man6 man7 man8 man9 mann
> ls /usr/share/man/
man1 man4 man5 man6 man7 man8 man9 mann
In short, when you do man -k somecommand, it displays results from all the paths contained in man -w. If you want to avoid that you need to change the $MANPATH environment variable. Set it to the path you want your man command to look.
(1)and(3), at least, is thatprintf(1)is a command-line tool, whileprintf(3)is the family of library functions (whichprintf(1)makes use of). I'm not sure whyprintf(1)is listed twice, but I can reproduce it and consider it harmless.