If you’ve read more than about three articles on this site, you know that I promulgate expository writing, writing designed to convey information so readers absorb the information effortlessly. (Promulgate means to set forth or teach publicly, but you knew that, right?)
Sometimes idioms and figures of speech can be taken literally, and this generally doesn’t promote understanding. Here’s a Gasoline Alley; the first two rows give a humorous take on this danger.
(The last row repeats a joke that has to be more than 50 years old, but I digress.)
Rule of thumb: When you explain something, be direct and literal.
A related situation is when you write something that will or might be translated. Idioms and figures of speech are notorious for causing problems in other languages. This goes both ways, so be careful when you read something translated into English. Google “badly translated into English” to find some humorous examples, but this can be a serious problem if the writing is about a serious subject. So be careful.