I find fantasy and sci-fi can allow a writer to be abstract about ideas/concepts. It allows me to understand some aspects of politics, psychology/social constructs and even questions the world we live in. Yes it can sometimes be escapism but most often it is not. It can be a vehicle to take a look at some disturbing aspects of humanity. I've noticed that a lot of writers that write fantasy and or sci-fi have studied subjects like sociology, physchology, latin, philosopy, linguistics, literature, history, anthropology and some of the sci-fi ones may have studied a science subject or two. In writing fiction they get to play around using what they have learnt.