I agree, but I understand its part of the game played. I have 13 years of IT experience, but still contribute to open source projects on Github, as my day job codebase can't be released/be part of my portfolio.
Exactly why I cringe at every one of these "my awesome interview tips/tricks/hacks/etc". The very fact that you publicly stated it makes it lose significant value. Most forms of testing are high value until the test becomes the goal, then its worthless. I guess having a handful of hits on their block one afternoon is more valuable to them than a useful hiring signal.