I actually think it's a good idea, because I get to judge the company and how they think design works just as much as they judge my skills and process. For example, one company once asked me to redesign their entire dashboard to see what I could come up with - no further instructions, no details, no specific goal in mind, so I dropped out right away and dodged a bullet there. But at the same time, there were also more than a few companies who asked for a very small and very specific problem (reimagine the location search in our signup process) and they were looking more for my thoughts on it and would be happy with wireframes or simple concepts - they wanted to see how I think and how I approach solving problems, and in those examples I think it's a good opportunity for me to show my strengths.
So if a company asks you for something small and is more interested in how you think about the problem rather than getting any actual work, then you don't need to worry about them using it, it's a tiny part of their design needs. If they ask you for a whole page on their website and are vague about the requirements, then that is work they could use, but you should stay away from the company anyway because they do not understand design and working there will suck.
This gets asked every so often on DN so you should try doing a search for it and see some more answers.
EDIT: All I said applies to design tasks during the interview process for full time roles. If you were asking about freelancing, then never ever do it. The client will otherwise start thinking it's easy and will find it harder to truly value your time and skills. Always charge for your time and be clear about the terms of your relationship.
I actually think it's a good idea, because I get to judge the company and how they think design works just as much as they judge my skills and process. For example, one company once asked me to redesign their entire dashboard to see what I could come up with - no further instructions, no details, no specific goal in mind, so I dropped out right away and dodged a bullet there. But at the same time, there were also more than a few companies who asked for a very small and very specific problem (reimagine the location search in our signup process) and they were looking more for my thoughts on it and would be happy with wireframes or simple concepts - they wanted to see how I think and how I approach solving problems, and in those examples I think it's a good opportunity for me to show my strengths.
So if a company asks you for something small and is more interested in how you think about the problem rather than getting any actual work, then you don't need to worry about them using it, it's a tiny part of their design needs. If they ask you for a whole page on their website and are vague about the requirements, then that is work they could use, but you should stay away from the company anyway because they do not understand design and working there will suck.
This gets asked every so often on DN so you should try doing a search for it and see some more answers.
EDIT: All I said applies to design tasks during the interview process for full time roles. If you were asking about freelancing, then never ever do it. The client will otherwise start thinking it's easy and will find it harder to truly value your time and skills. Always charge for your time and be clear about the terms of your relationship.