I'm sure Jeff Sessions knew Moore was a questionable candidate and advised POTUS accordingly.
Trump needed Strange’s vote in the senate. Strange was not wanted by the voters mostly because he had been appointed to fill the seat by our former disgraced governor who resigned shortly after the appointment. Strange had been the state AG, so it was advantageous for the ex-gov to appoint him.
Honestly, it had seemed that most people wanted Brooks appointed. When the election was called, it seemed that there should be no way Strange was going to win. You have to realize we have crossover primary voting here. The dems vote for who is easiest to defeat. The conservatives split between Moore and Brooks and Moore came out ahead, forcing a runoff between Moore and Strange. Moore never strongly campaigned through the primary of runoffs. Yet he came out on top, until facing the dem.