I recall in the early or mid 2000s using some cheap earbuds plugged into the microphone port of my family computer as a pair of microphones in lieu of having a real microphone nor the money for one. Then I used Audacity to turn the terrible recording into a passable sound effect for the video games I was making.
Not knowing much about how soundcards work, I imagine it would be feasible to flash some soundcards with custom firmware to use the speaker port for input without the user knowing.
This is common at nightclubs (or was) - a DJ can use their headphones as a microphone, speaking into one channel and listening to another
Example https://m.youtube.com/watch?v=1NNP6AFkpjs
:-)