The AFP were briefed by diplomatic sources that it was because he had anti-Trump messages on his phone. After the story broke, a spokesperson for the Trump regime denied that, but major news agencies are continuing to report it as the reason for what happened, and so is the French research ministry.
There is a question here of who to believe. Personally I'm more inclined to believe multiple independent media sources than the Trump regime. Especially as this is part of a pattern of people being denied entry or arrested for spurious reasons: I'm guessing you also want to deny the experience of the German tourists who were detained for weeks, or the Canadian with the work visa who was detained for 2 weeks, or the British artist who is still in a detention centre out there?
Several countries (including the UK) have tightened up their travel advice for the US since these events.
In any case, why should I go? It's not about being special, it's that these kind of things can happen to absolutely anyone under the hostile approach to immigration taken by the administration. Anyone's phone can be searched or social media handles checked. It probably won't be me, it will probably be fine, but why should I put myself in that position? Risk is about likelihood x impact, not just likelihood. I don't particularly fancy taking the risk when there are lots of other places I could go to lecture in instead.
If you want to go, knock yourself out. It'll probably be fine. But make sure you don't make any mistakes on the ESTA form because there are no guarantees now that you won't be locked up for weeks because of a misunderstanding.