It sounds like you had some bad interviews. They should present you with a problem and ask how you would solve it. They wanted you to know a particular method. That tests your knowledge about the method but that doesn't test your problem solving abilities, project planning abilities, or software development skills in general. Personally I'd take that as a warning sign that I might not want to work there. Software development is a very open-ended field, there isn't usually a right or wrong answer.