In the book of I Kings, the prophets’ role was to be the voice of God for the people. They provided guidance, instruction, and correction in the daily life of God’s people. They were the voice of Truth. I think God chose to speak through the prophets so they could act as mediators between God and His people. The prophets were a precursor to when the Holy Spirit would come to abide in the hearts of all that followed Christ.
The prophets were vital as the Israelites were being torn apart through the two kingdoms. They needed to know God was still present and that He wanted them to know Him and His words. Elijah worked many miracles specifically in the kingdom of Israel in the North because they did not even have the foundational base of God, for they were even worshipping statues and calves (reminiscing of the wilderness), so miracles were even more important for them to witness – they need to see God was there. Harsh reminders were necessary.