A jungle began as a place with hardly any plants.

The word is Sanskrit jāṅgala, which Wikipedia glosses as rough and arid terrain. Etymonline glosses it as arid and sparsely grown with trees, and says the Sanskrit word's own origin is unknown. In Hindi and Urdu it became jangal, a broad word that Etymonline lists as meaning desert, forest, wasteland or uncultivated ground. The common thread was land that nobody farmed.

English borrowed it in the late 1700s. Merriam-Webster's first known use is 1776, and Etymonline gives the same year, in the sense of a dense growth of trees and tangled vegetation in India. Wikipedia notes that an Anglo-Indian reading of the word may have produced the "tangled thicket" sense. If that is right, British writers applied a word for wild, uncultivated ground to the overgrown thickets they saw in India, and the new meaning stuck.

The meaning kept widening. By 1849 it covered any place overgrown in a wild tangle, and by 1850 it was figurative, for a wild, tangled mass of anything. By 1906, with Upton Sinclair's novel The Jungle, it could also mean a place notoriously lawless and violent. Etymonline also lists "asphalt jungle" from 1949 and "blackboard jungle" from 1954.

Kipling's The Jungle Book (1894) gave English "the law of the jungle." Wikipedia points out the irony: in the book it is a detailed code of rules, not chaos. In ordinary speech it now means a survival code in a pitiless place.

The scientific vocabulary has moved on. Wikipedia reports that from the 1970s "rainforest" increasingly replaced "jungle" for tropical forests.