means that
a person or thing of genuine merit may emerge from humble or unpromising surroundings and should not be judged by outward appearance.
The saying “There is many a good cock come out of a tattered bag” can be used when you shouldn't judge people from their appearance or the first impressions.