“with the result that I will drive you out and you will perish.” This is a great example of how the Devil and demons work behind the scenes to destroy God’s plans and His people. We can tell from the context and scope of Scripture that the false prophets were getting their information from demons (Jer. 2:8; 23:13), although no doubt most of them did not know it. This is the same way that most psychics, fortune tellers, and mediums get their information today, which is why those practices are an abomination to God (Deut. 18:9-15). Not all false prophets and teachers are ignorant of the true source of their information, however. Some people actively work for the Devil (in person or in one of his many forms) and know the true source of the wickedness they are promoting, but it fits with their agenda.
Also, however, there are times when a prophet feels so strongly about something that he thinks it comes from God even though it is just his imagination (Jer. 23:16; Ezek. 13:2, 17). But in those cases, the reason the prophet would feel so strongly that false information was actually the truth would be due to the fact that his mind had been influenced to think that way because of the culture around him and his own ungodly thoughts and behaviors (cp. 1 Tim. 4:1-2; Eph. 4:17-19). That is a major reason that the Bible has so many verses about guarding your heart and thoughts and living a righteous life (cp. Prov. 2:20; 3:21-23; 4:23; 16:17; Phil. 4:8-9). Anyone’s heart can be darkened if he follows his own fleshly desires—our sin nature will lead us to evil and death (Prov. 14:12).
The Devil and demons want God’s plan and His people to be destroyed, so they promote information that will result in that end. This happens in every field of endeavor, especially fields of great influence, such as government, religion, education, and healthcare, and it is one reason that we must be godly and promote godly leaders. Ungodly leaders do not have to be “prophets” to promote evil plans, they just have to have an ungodly or anti-God understanding of life, and/or be getting information from demons. Godly leaders do not “just hope” ungodly people will go away—they won’t—so they watch for, and then scatter or destroy, evil within their field of influence (Prov. 20:8; 21:12).