According to this Wikipedia article, Falcon Heavy is claimed to be able to deliver a payload of 63,800 kilograms to LEO. According to this article, the Tesla Roadster has a curb weight of 1,305 kg. Now there is also the Starman dummy and his suit, the support frame, and camera booms. And there would have also been the extra second stage fuel to push it all out of Earth orbit. How does everything add up as far as "payload to Earth orbit" is concerned for the test flight? Was it a true test of Falcon Heavy's advertised capacity? Was there unused capacity? Was there additional ballast to bring the actual payload weight up to something close to the Falcon Heavy's "advertised capacity"?
The advertised 63.8 tons payload capacity is for low Earth orbit (LEO). The further you want to send the payload, the less payload mass you can send.
The Roadster/Starman test payload went far beyond LEO, winding up on a trajectory that reaches beyond Mars' orbit, to the inner reaches of the asteroid belt. The rocket motor and fuel used is the Falcon second stage, which is not part of the advertised payload capacity.
In order to get 63.8 tons into LEO, the second stage would use all its fuel.
Getting the comparatively tiny Roadster into LEO took only a small portion of the second-stage fuel. The rest of the second-stage fuel was then used to send it out of Earth's orbit.
Finally, the 63.8 tons figure advertised by SpaceX is almost certainly for the fully expendable mode, where none of the boosters are recovered (because no fuel is saved to land them). Their payload figures include the potential of sending 3.5 tons to Pluto - twice the mass of the Roadster and a substantially greater velocity requirement.
This was a test flight, one that was to demonstrate that the rocket worked. You don't do your first test flight at full capacity, as even a small error could cause you to be falling in to the ocean without success. The payload actually could have been launched to the same trajectory on a reusable Falcon 9, without the extra boosters, as the Falcon 9 payload to Mars is 4,000 kg, and the payload was only 1350 kg. Of course, this assumes a direct to Mars trajectory.
Furthermore, they deliberately did a 6 hour coast. As the coast goes on, the amount of fuel remaining in the rocket drops. The fuel is cryogenic, and slowly will evaporate, which generates pressure in the tank, which must be released to keep the rocket from exploding. Some of the spare capacity was lost there.