In its last months the Obama administration ordered the intelligence agencies to collect and distribute information of contacts between the Trump campaign and Russia. This to prevent any change by the Trump administration of the hostile policy towards Russia that the Obama administration instituted. The intent was also to give the intelligence services blackmail material against the Trump crew to prevent any changes in their undue, freewheeling independence.
Source