I see this when applying to many jobs and freelancer sites (most recently Gun.io). They always want a sample of your "best code", but they never explain what criteria they use to measure "best".
Are they looking for incredibly tight code (i.e. Code Golf)? Or something clean and readable that solves a common CS question? What if my "best" code is something that doesn't make much sense outside the context of the project, or if it's proprietary work that I did for hire?
This question just seems like an arbitrary way to get rejected, so how do you respond to it?
For example, I wouldn't hire someone who sends me proprietary code from their previous job, and someone who "solves a common CS question" instead of submitting something advanced and/or useful shows that they are very junior (which is not the same as being careless and incompetent).