Devarim 8:3 explains the true purpose of the mohn:
"He afflicted you and starved you and fed you the mohn that you did not know and that your fathers did not know. To teach you that not on bread alone does man live but on all that God says does man live".
I'm summarizing two explanations.
One from Ramba"n that says on "You did not know" meaning that you did not know that you could live (on it) for so many days.
Ohr Hachaim focuses more on what the mohn did to the digestive system. I have trouble understanding his full explanation - it is lengthy. But the important part I could decipher is that the mohn was considered the food the angels ate (I assume the source of this is Midrash). He points out that there are foods that are healthy for both the healthy and sick and foods that are OK for only the healthy and not the sick. Since the beginning of this verse states that God starved us first and then fed us the mohn, the people assumed that they were sick and since the mohn was hard to digest, it would be harmful to them.
I hope that I have "translated" at least somewhat correctly what the Ohr Hachaim stated, there.