One of the many purposes of pretrial detention is to prevent perjury/collusion/deception in the court room.
That goes for bail-bonded pretrial detention as well.
Just because you aren't behind bars doesn't mean you have freedom to communicate however you like.