Launch costs for a Falcon 9 are about near 70 million dollars now which is also the estimated production price of the rocket including launch. So it seems they are not making a big loss even when the first stage explodes on the first landing attempt. It's already 'paid off' after one single use.
Price estimates of a first stage are in the 15-20m dollar range so every reused stage will net them about that (minus refurbishing costs) as a bonus.