From verse 15 - 29 Nephi presents a series of prophetic woe-proclamations, literarily paralleling the woe-proclamations in Isaiah 5:8-23,25. (Cloward, Robert A. “Isaiah 29 and the Book of Mormon.” In: Isaiah in the Book of Mormon. FARMS 1998, p. 214). While not following the Isaiah text as he does in other cases, Nephi nevertheless builds on the concept of the woe-statements, and in this particular verse restates a theme from Isaiah’s pronouncements:
20 ¶ Woe unto them that call evil good, and good evil; that put darkness for light, and light for darkness; that put bitter for sweet, and sweet for bitter!
21 Woe unto them that are wise in their own eyes, and prudent in their own sight!
Isaiah was condemning the worldly wise, and Nephi takes that condemnation to his “learned, and the rich.” When Nephi suggests that the learned and the rich are “puffed up in the pride of their hearts” he has the same understanding as Isaiah’s “wise in their own eyes, and prudent in their own sight.”
In this first woe-proclamation, Nephi’s target is the learned and the rich. Nephi’s confluence of those two categories mark this as an ancient text. A modern understanding would clearly show the separability of the learned and the rich (as most university professors will freely attest). The conflation of rich and learned comes from a time in which only the rich could become the learned, when the access to education was controlled through the accumulation of wealth. The historically recent emphasis on universal education has diluted the power of this connection, though it is still apparent in some cases today. For Nephi, however, they were unquestionably equivalent.
It is easy to see how the rich, learned, and powerful could command the dissemination of religious knowledge such that they could teach their own doctrines rather than the doctrines of God. What does not make sense in the context of a modern set of linguistic connotations is that the learned and rich should also “commit whoredoms.”
Of course it is possible, and historically accurate, that many of the rich and powerful did commit whoredoms. However, Nephi appears to apply this concept to the entire category, suggesting that for Nephi he is speaking less of a moral transgression than a spiritual one. The “whoredom” of the rich and powerful is their congress with the learning of men - not their congress with the flesh of women.