When you're testing a rocket that's going to haul stuff into orbit, part of the test has to involve...well, hauling stuff. A government agency will normally use something cheap and inert like concrete. SpaceX is not a government agency, and ~$250,000 is not a large amount of money relative to the overall cost of the mission.
Also, think in terms of marketing. Some people say that you can't buy this kind of publicity, but that's exactly what Musk did. He put a car (his car) in space. If you're selling a cars and rockets, what's it worth to use your rocket to put your car in space? Everyone on the planet is talking about his products, and they will continue talking about his products for some time - even on a treasure hunting forum of all places.
I suspect that there are a number of other car companies wishing that it was their car up there right now. Unfortunately none of them build rockets. I'd say that was a few hundred grand well spent.