This is why I always stay in a hotel and not with friends or Airbnbs whenever I visit China. I'm not bothered to deal with registration and the hotel takes care of it.
Of course the wealthy here would never know, most places priced in the top 20% expensive accept foreigners. I was a poor student and also worked as a teacher($400/mo) looking for midrange accomodations, not to spend a month's pay on a weekend trip
Yep, one would think that for a government that cares so much about their image they would avoid visitors having to go through this nonsense.
For budget travellers to Beijing -- 如家 accepts foreigners last I checked. 7天 used to but they don't anymore as of a couple years ago.