Obviously, if there is reason to suspect that actual crimes have been committed... then it's not just permissible but vital that the FBI investigate such allegations... But the FBI investigation... clearly based, at least in part, on the FBI's disagreements with Trump's foreign policy views and the agency's assessment that such policies fail to safeguard "U.S. interests” as the FBI defines them. The NYT notes that among the events that prompted the investigation were that Trump "refused to criticize Russia on the campaign trail...”.