I think back when cars and motorbikes were a fairly new thing and there were very few traffic laws (just look photos and movies of chaotic big city traffic in the early 1900s), it was the natural thing to do especially with bikes being so much quicker and more maneuverable than cars. As vehicles got bigger and faster, in most places in the US the practice got outlawed, probably after a few fatal crashes. In some places it didn't get outlawed, and in those places drivers are more used to watching out for bikes trying to "lane share".
I lived in CA for years and still get back out there often on two and four wheels, so I see it from the perspective of a resident, visitor, car driver, and a motorcyclist. I generally don't lane share on the bike when I'm in CA because I'm usually not in that big a hurry, and mostly because I don't trust people to be watching out for me and to stay in their lanes on a predictable, consistent basis. However, sometimes I decide that the dangers of sitting in stop and go traffic on a bike outweigh the risk of filtering forward, so I exercise the option. In my experience, many drivers in CA are so used to bikes filtering forward in heavy stop-and-go that they will move over and open up a gap if they see you in the rear view mirror, even if you're not trying to get around them.
The most manic lane sharing/splitting I've ever seen was in Rome, Italy, where rivers of cars frenetically leapfrog with thousands of motorcycles and scooters through the ancient, twisty streets. Some people find it unnerving but I thought it was fun, and it seems to work well for them.