Having been both a data analyst and software engineer I agree. The data analyst one? Here is 50K of Excel rows with all kinds of weirdness in it, you're data analyst right? You have 4 hours to analyze this data. Go!
The software engineer one: here is a takehome assignment. One week later: finished!
To be fair, they both represented pretty well what work I'm going to do. The data analyst didn't show that well how much I'd also be data engineering, but whatever, I was a SWE before having a DA stint. Back to SWE again though.