1 Corinthians 14:25 KJV
And thus are the secrets of his heart made manifest; and so falling down on his face he will worship God, and report that God is in you of a truth.
Prophecy had taken on a new role by this time in the Bible. The preacher, though still foretelling for a time until the Bible was completed, was generally a "forth teller." In this early church those with the gift of prophecy - and I take it that churches had more than one with that gift, would be given orderly opportunities to preach. The Bibles supposes that the lost and unlearned would find their way into those services and, through the preaching; the secrets of their heart would be revealed.
Over the years it has been frequent that someone has approached me after my message and said that it was like I was looking into the windows of their home. I did not do that, but God sure did. And He used the preaching to reveal it to them.
That it the purpose of preaching.