Neither HackerRank nor Leetcode invented this style of interview. The questions you're complaining about predate both sites. The sites were created to help you study for those questions, they did not significantly popularize the questions.
The availability of these sites makes it seem like it's a standard, which adds to the problem. Some small company might not have taken that approach. Now, you don't want to fall behind by not making use of a widely-accepted "standard" practice.
> Now, you don't want to fall behind by not making use of a widely-accepted "standard" practice.
Absolutely. I can understand Google asking you to write a k-way distributed sort off the top of your head, but I've had similar questions from an "enterprise gone unicorn" that were clearly still in the "wtf even is cloud" phase.