Why wouldn't they know? Everything about your site is fair game. Consider Google's official position on robots.txt:
You should not use robots.txt as a means to hide your web pages from Google Search results. This is because other pages might point to your page, and your page could get indexed that way, avoiding the robots.txt file.
In other words: we crawl the hell out of everything, and we do not even bother to check robots.txt when crawling a linked page. And that's just Googlebot operating in normal mode, it doesn't get to the deeper levels.
Cloaking is a huge red flag. Google's biggest enemy isn't spam, it's giving grandma malware, and the best indicator of a malware site is cloaking.
Blocking isn't as big a deal for Google, but it's also hard to hide from them. There is no feasible way to block access that isn't visible to The Big G.