This is because the Mac Mini’s input jack is a Line input not a Mic input (this is true of some other models as well).
A microphone produces a signal that is many times weaker than a line level signal.
CDs, stereos and electronic music instruments output a much stronger Line level signal
To use a mic with a line input, you need to preamplify the mic signal, with a preamplifier, a mixer or similar.
Alternatively you can get a USB connected audio interface
or you can get a USB microphone