Construction Contracts can be difficult. There is a constant battle between the contractor and the subcontractor on risk shifting. One of the most dangerous risks is the risk of non-payment for properly performed work or supplied materials. A commonly used defense to payment is that the contractor hasn't been paid, so how can they expect to pay you for the work you have already done? The "Pay-if-Paid" clause can give them that right, the right not to pay you, to shift the risk of non-payment to you.
Watch this video to understand the dangers of a pay-if-paid clause, some tips on negotiating them out of your contract and the laws that will let you do that.