So yes, given that stuff like that happens, I do find it impressive.
Honestly this does sound pretty terrible. The student doesn’t have to publish, and you don’t get to misrepresent yourself as first author if they don’t want to.
Really really want to be first author, redo the work yourself. That’s the only way you can claim credit (and responsibility) for having done the work.
Edit. A famous example is Selman Waksman and Albert Schatz [0, 1].
More seriously, maths (I don't know much about the theoretical cs field) is a bit of an anomaly in this respect compared to most of the sciences.
The problem seems to be worse the more money you need to do your research - maybe this is why maths excapes the usual feudal hierarchy where the lord own everything including their serfs ideas.
Scott Aaronson's lecture notes are also great https://www.scottaaronson.com/blog/?p=3943.
good ideas can often seem pretty crazy.