It's really expensive! That's why some teams can't afford to have their cars crash all the time, especially the small teams. Breaking the engine or the gearbox would costs them a huge amount of money. Also, there's only a few number of engine parts change or gearbox allowed in Formula One, if you exceed the limit, you're gonna have a grid penalty in the race.