Allowing the pastry to rest in the fridge for the first time makes it easier to roll out the pastry to the desired size and thickness.
Allowing the pastry to rest in the fridge for the second time will stop the pastry from shrinking while cooking.
If you are stuck for time you can skip pastry resting, but be warned, your pastry may be difficult to handle and will likely shrink and/or crack.