participate in a criminal investigation or prosecution if he has a personal or political relationship with any person or organization substantially involved in the conduct that is the subject of the investigation or prosecution, or who would be directly affected by the outcome.
28 CFR 45.2 - Disqualification arising from personal or political relationship.
Sessions found that he had a political relationship with the Trump campaign, arising from service as a principal adviser to that campaign. Given that finding, the rule says he should recuse.
The rule does provide an exception. I'm confident the formal recusal analysis considered the exception and that it did not apply. The public would not believe Sessions was an impartial judge of allegations against the Trump campaign.
-- He's either under investigation or not ... --
Conflict and recusal for conflict applies to the investigator or prosecutor, not to the target.
The "campaign advisor" language is at part (c).
(c) For the purposes of this section:(1)Political relationship means a close identification with an elected official, a candidate (whether or not successful) for elective, public office, a political party, or a campaign organization, arising from service as a principal adviser thereto or a principal official thereof