I think majority do that as a procedure to test your problem solving abilities. However they are some that prefer just a discussion more like a question and answer interview where you get to talk to them about your work ideas and how you’ll approach some problems.
