I believe both of them accepted the project before having read the book! This is remarkable enough by itself. I believe Jodorovsky read it once he finally got excited about the project, and Lynch read it once as well. So basically they both dove in sight unseen, and each finally read it but didn't study it thoroughly.

I think Lynch read Dune more closely than Jodorowsky, even though the film isn't completely close to the book. If you look at the earlier drafts for Dune by Lynch, he originally tried to include more details from the book alongside the new subplots. Part of the reason why Lynch's Dune movie was so bizarre was because Lynch was insecure about the Dune movie being seen as a Star Wars rip-off. Of course, we know that Dune and Star Wars were completely different universes, but in the mind Lynch (and perhaps Frank's mind, too) Star War used up what made Dune unique. Some things from the book were made weirder than it was.

The other reason was because of compromise. Lynch wasn't completely in control of this movie, and De Laurentis wanted the Dune movie to fit his own vision of cinematic pizazz (kind of like how he did with Flash Gordon). Laurentis wanted Lynch to direct Dune like he directed The Elephant Man instead of Eraserhead, so the film was a compromise between Lynch and Laurentis. Then after the film was finished, it became a compromise between the director+producer and Hollywood, who wanted the film to fit within a two-hour time-limit (even at the expense of its story), and that ensured Dune's negative fate with audiences and the critics... But its legacy wasn't so bad. Frank Herbert wrote that Dune was number 2 in the box office in Japan and Germany. It even was considered a little bit challenging, as Frank noted when a critic disliked the film because, in the critic's own words, "I don't like movies that make me think." It's still an iconic sci-fi film, albeit a cult one.

As for Jodorowsky, it is odd that although he alters Dune's plot immensely, he was going to include more of the characters from the original book than Lynch had. That's impressive for a guy who didn't want to be faithful to the book.

'...all those who took part in the rise and fall of the Dune project learned how to fall one and one thousand times with savage obstinacy until learning how to stand. I remember my old father who, while dying happy, said to me: "My son, in my life, I triumphed because I learned how to fail."' -Alejandro Jodorowsky