I've seen realtors ask for ID unless you're accompanied by another realtor (who would leave a card). Basically they want a record of people through the house in case something does happen. You could easily make a fake business card, of course... professional courtesy means a realtor seldom asks another for an id. But this would likely only work briefly in a given area once word got out.
That isn't how an open house works (at least in my experience buying a house in Los Angeles in 2018). They advertise the hours, put up a bunch of balloons, and anyone can walk in. They ask you to sign a sheet so they can contact you, but I never saw them make anyone sign it or request an ID. I visited maybe 30-50 houses doing open houses, and a good half of those weren't with our realtor (or they arrived well after we did).
I went to 50+ open houses in the 3 years pre-Covid (finally bought a place just before it started) and was never once asked for ID. They usually ask you to write down contact info on a sheet, which I do using intentionally impossible-to-read handwriting to avoid follow-up spam.
I bought my house in a raging micro bubble in the Bay Area and got the first one I made an offer on. Really just depends how much you care about getting a good deal. I did some math and figured it wasn’t worth the effort.
There's a lot of stuff that looks better online than in real life ;)
And we took quite a while to figure out what we really wanted (and we were comfortable living in the place we were in, so we didn't need to make a change...)
We only ever made three offers, two of them on places we saw on the same day.
I bought a house before and attended a number of open houses. I signed my name on a sheet but was not asked to present ID. In some cases (I guess where the realtor figured I wasn't going to buy? Not sure) they just let me walk around and paid no attention to me at all.