> Would the suspicion have to be announced to me, when I’m asked to unlock my phone[?]
No. Officers don't have to disclose to you their reasons. It's helpful, but not constitutionally required.
>[W]ould it have to be presented to a court, when they are asked to prosecute me based on the contents of my phone?
Not necessarily. In a criminal prosecution violations of the Fourth Amendment can be excluded by the court. The theory underlying the exclusion is that without the exclusion there would be nothing to stop cops from violating your Fourth Amendment rights. A criminal defendant must challenge the use of the evidence found, and the officer must give their reason when the judge is trying to determine whether to allow the testimony.
In the US, you can also sue the officers when they violate your rights and win money damages. That's what this case is. The officer as part of their defense must give their reasons to defend they didn't violate any constitutional rights.
>If they find illegal content on my phone, wouldn’t the prosecutor just tell the court “she matched a profile for the sort of person that carries illegal documents”?
Probably. Some courts may additionally require the officer to give a basis of why you fit that profile, or why someone who fits that profile reasonably is likely to carry illegal things. Typically just saying it matches a profile is sufficient.