In which cases are non-linear learning methods preferred than logistic regression in classification problems?
There are several assumptions that are needed to be satisfied in order for logistic regression to work. From personal experience the two most important assumptions:


Features need to be not (or a little) correlated with each other, because if they are correlated then the change of one feature indicates also the change of the other that's a problem when you try to solve the optimization problem
May some features not be ordinal


You can also check here for more information.

Other learning methods such as RandomForest require no such assumptions and may work better for some datasets. But keep in mind the no free lunch theorem, most of the times you need to get your hands dirty and test several learning models before you decide which works best for your data.