You can make a lot of money supporting a dying technology, right before you're unable to make a dime. Demand decreases in terms of number of customers, but increases in terms of intensity among those who need it. Supply and demand both go to zero, but not at the same rate.
I noticed this in the late 90s too. Learned COBOL and right out of high school and was immediately making, what seemed to 18 year old me, tons of cash fixing HEB mainframe apps for y2k.