LA is near the coast but why isn't downtown built directly on a port or navigable river like most big coastal cities?
There are no navigable rivers in southern California, so that was not an option. The area of downtown was inhabited by the Tongva people when Europeans arrived in the early 16th century. About 90% of the Tongva diet came from the acorns of the California Live Oak. The acorns are toxic unless they are painstakingly crushed and thoroughly washed, so the combination of the downtown oak groves, nearby the Los Angeles River, made a perfect place for this process. When Europeans moved into the region they settled in the same area for the same reasons, access to water and trees (for building supplies and shade). Another possible reason why they did not settle closer to the ocean, is strong botanical evidence that Los Angeles was not the dry place we think of today over the entirety of its history. In fact the low-lying areas of the Los Angeles basin are still today a seasonal floodplain, and there is evidence that as recently as only a few hundred years ago parts of the Los Angeels basin supported wetland grasses which need standing water year-round. This could partly explain why most of the Los Angeles basin would not have been suitable for settlement, especially low-lying Long Beach where the Los Angeles river empties. The same goes for Venice Beach/Marina Del Rey where the Ballona Creek empties. Thus dry land with large trees and easy access to a major river was a prime place for a homestead. After the discovery of gold, California wealth began to obviously grow, and more people moved to Los Angeles partly due to this. Then when oil was discovered in Southern California in the late 1800s, much more wealth followed. All these people needed somewhere to live, and where better than the thriving and already popular downtown. All that wealth necessitated banks and other financial institutions. People led to businesses, which led to more people. Thus is the the history of downtown. However, in the grand scheme of things, it really doesn't bare much importance today where the "downtown" of Los Angeles is located. The entirety of Los Angeles county, Orange County, and much of Ventura, Riverside, and the population center of San Bernardino County are all integral organs of the fully-functioning whole of "Los Angeles." Downtown Los Angeles is hardly a centralized business sector in the way that Manhattan is to New York, upper New Jersey and southwestern Connecticut. This may be in part due to some of the key elements for a major city which Los Angeles is lacking, and you have pointed out a couple of these. Instead, Century City, Beverly Hills, West Hollywood, Santa Monica, Long Beach, Burbank, Glendale and Irvine, just to name a few, are not part of the city of Los Angeles, and all have thriving economies, tall buildings, and could be considered legitimate downtowns of their own right.