In 1875, Los Angeles was a town of around 8,000 people, and there were no palm trees in sight. The palm trees were added to make people want to come and buy land in southern California, but it wasn't L.A.'s developers or city planners who came up with the idea: it was the French.
Up until the mid- to late-19th century, the French Riviera was sparsely populated. But popular writers began traveling there, and found it was pretty nice. That, coupled with a trendy new health fad in which time in a dry warm climate is supposed to have good effects on the body, increased its popularity. Immediately developers moved there and began building it up. Palms, already a symbol of warmth from the Middle East, were ideal for this kind of rapid development.
Remember how palms aren’t like other trees? One way is that they’re outrageously easy to move around: they don’t have elaborate root systems like oak trees, but instead a dense yet small root ball. This can be pretty easily dug up and transported, then planted, and palms are not particular about where they are, as long as they have sun and water. To make things easier for developers, palms, being more like grasses than trees, don’t demonstrate all that much difference between individuals; one Mexican fan palm is pretty much like the next. And if you’re a developer, consistency and ease of transportation is a fantastic combination: you can line the streets with them, or plant one on each side of an entrance! And it’s cheap and easy and looks festive. Plus, it has this preexisting association in the minds of your customers (who, in the case of the early French Riviera, were mostly British) with warmth and exoticism.
It worked for the Riviera, so maybe it could work for Los Angeles, right? Only the California developers and city planners went a few steps further in branding the city with palm trees. Read the history of the palm trees of L.A. at Atlas Obscura.