The main "weird shape" might be the long thin extension of the political boundary of the City of Los Angeles down to San Pedro, and the inclusion of San Pedro, well south of the rest of the city.
This shape was the result of the "Free Harbor Fight".
Los Angeles did not have a good port. In 1869, the Los Angeles and San Pedro railroad became the first railroad in the area. At this time, San Pedro was not a very well protected port, but channels were being dug into the mud flats of San Pedro, and a port was being developed.
The competition was from Collis P. Huntington, president of the Southern Pacific railroad, who wanted to build a port at Santa Monica, closer to his railroad's terminus.
San Pedro was a better location to build a port, and eventually complex deals, including turning the railroad to San Pedro over to the Southern Pacific railroad, allowed the dispute over port sites to be settled.
The San Pedro breakwater, completing the protection of the port there, was finished in 1910, and the City of Los Angeles secured a change in State law in 1909 which allowed the City to absorb San Pedro and Wilmington and a long narrow corridor of land, running along the railway line, which connected them to the rest of the City.