Cash = zero proof you paid.
There should be no penalty to a contractor for taking a check. The only reason they would want to do that is to not report all the sales in their books. That means you might have no record in their books of payment. That could impact you financially down the road, could mean no proof of warranty and should you have any roof issues later they might not have you in their records.
Depending on where you live a contractor/vendor may be able to put a lien on your home and you never even know it. Happened to my mother from a roofer. The roofer took all her money but he didn't pay the shingle supplier for her supplies. The supplier put a lien on her home. When she sold her house many years later they said they would have to take that amount out of her sale proceeds to give the vendor ... even though she had already paid in full to the roofer.
There is no way I'd pay for any contractor work in cash ..
.... unless you are doing work under the table and willing to take on the risk.