If you're looking to vent, then I'll say, "That sucks, dude. Keep in there, it's all a numbers game." Tomorrow will be a better day.
But, I'm going to be bold. I'm going to out on the limb and suggest that: maybe it's not being asked "RANDOM shite," but maybe your attitude. Generally speaking, I've had to do three to five or so interviews to get an offer. Depending on the market and the timing, I've had far, far worse. I once spent four months trying to find something, anything. So, here are a few thoughts for you or anyone else.
People who have 10 years (or claim 10 years) C#/SQL are a dime-a-dozen. You're competing in a market that is dying, the same way Java developers are dying: a smaller and smaller group of employers who are stuck on the tech. Microsoft lost, which is why they are trying so desperately to incorporate Linux/Open Source technologies. You're going to be valuable to company if you're either inexpensive or the best-of-the-best. Your skill set is dated. Get it back into shape. Luckily, our profession is one of the cheapest to retool. Unfortunately, you should have been doing this two years ago. Spend your free time learning, always. Get yourself up to speed with NodeJS/Vue/React, etc. If you don't have experience with Linux, get it.
Companies want one of two things: a reason to hire you or a reason to not hire you. Be involved in that process. Is it a really a random problem? Or, are they trying to gauge how you think and approach problems? How did you respond to it? Were you inquisitive or were you as hostile as this post? When I've been a hiring manager, I always ask questions like, "How many baseballs will fit in a 747?" Good candidates say, "Well, I'll just estimate that a 747 is 100 feet long and 30 feet wide and so.." Great ones will point out that if packed it full, it may be overweight to fly. Bad ones say, "I don't know." The interview is there for you to present what you know and what you're interested in. Your resume should be tailored to present things can talk about. It's all about selling you. If you have a recruiter, talk with him or her. If you're not using a recruiter, get one. Have them get feedback on the interview. Then, take it to heart. Period.
On the flip side, there are companies want conformity. You're either "it" or not. If I don't get an offer, I don't want the job. There is zero point in being in a place that questions your ability to fit in. I've gotten turned down from some pretty cool places, but that's life. I wouldn't have had the career or the friends in my profession that I do had some of those jobs worked out. I even found out later that whole groups of people got laid-off, quit, etc.
The important thing is: getting a job is not a right and it doesn't come from meritocracy. It's people looking for people who solve the problems the company has and doesn't bring more problems to the company. Think about it from their perspective and try to figure out how you, your experience, and your attitude is benefit for them. If you've been in this profession for several decades, you have it in you.
By the way, my first computer was at nine and it had 4k of RAM. I always sell that: "So, I got into computers when I was nine. After punching in two plus two and see it spit back four, I instantly wanted to know how it could possibly know that. I've never stopped learning since." Right then and there I set the tone for the company: You may have problems I don't understand, but I will figure out the answer.