Indeed. Many have lazy useragent implementations though
And if Google cared then neither of those pages would be public. At some point SEO became something that Google condoned and actively supported instead of seeing it as people trying to game the system.
I have a user-agent switcher and switching to googlebot definitely puts you beyond many paywalls.