Based on my evaluation that Trump only does things to further his agenda of sowing distrust in institutions and not out of any sense of justice or progress, here is my take:
He is forcing Assange to say "I will not reveal my sources as I am a journalist". Trump then gets to say he tried. The "media", especially any real journalists that take their profession seriously, will provide analysis that Assange is right for refusing. This gives Trump another opening to smear the media by portraying them as pro Assange, pro hacking and anti DNC.
Thankfully people (other than those very into QAnon) have given up on the n-dimensional chess theories for the most part, but if we needed any more proof nearly incriminating himself in a phone call with Bob Woodward (who keep in mind has already written an extremely critical book about Trump) while trying to woo him (in effect) is the most recent disaster.
He is forcing Assange to say "I will not reveal my sources as I am a journalist". Trump then gets to say he tried. The "media", especially any real journalists that take their profession seriously, will provide analysis that Assange is right for refusing. This gives Trump another opening to smear the media by portraying them as pro Assange, pro hacking and anti DNC.