A currency transaction report or CTR is required for cash transactions in the amount of $10K and above. So at first glance it might seem unreasonable for them to ask for ID unless you present tickets/chips totalling $10K or more.
However, it is a crime ("structuring") to split up what would otherwise be a $10k+ plus transaction into multiple smaller transactions for the purpose of avoiding a CTR. So I am not sure how much of this is an actual legal requirement, but I have the impression that the casinos are at least strongly pressured to start keeping track of transactions at much lower levels like the ~$3k range, so that if you later make a couple more transactions (even innocently without intent to evade the requirement) they can still know to fill out a CTR at the appropriate time.
If you refuse to show ID or a players card they'll probably just write down an approximate description, guess your height/weight etc. (one time a cashier didn't even ask me for ID or a card, which I would have willingly provided, but when she wrote down an estimated height/weight I objected because she was off by 10 pounds )