Is publishing papers before the evaluation of thesis a good idea? Is publishing papers before the evaluation of thesis is a good idea? 
Isn't there a risk of making the idea public?
Four reasons why it's generally a very good idea to publish papers before you submit your thesis:


The earlier you publish, the less likely it is that your idea will be scooped [1], i.e. that someone working in the same area actually publishes the same idea/result before you.
Once ideas are published, they are not stolen: they are used, built upon, with proper attribution (usually in the form of citation). This is not theft. 
The goal of an academic is actually to disseminate new knowledge, not to lock it into your desk drawers.
Having papers published (or at least accepted for publication) is very very important for your CV. It may also be a requirement (formal or unspoken) for defending your PhD.
If said publication includes peer review, the peer review is likely to improve your work, both by vetting it thoroughly and giving you new points of view on your arguments. (I edited this in after reading gerrit’s answer; it is an important point.)




In some specific cases, good arguments can be made against publication before thesis submission. Most are actually not specific to the thesis itself, but generally apply to delaying publication of a research:


If research is performed as part of a contract that requires an embargo on publication (say, imposed by one industrial partner). This is a very awkward situation, but it does happen in some fields.
Sometimes, a delay in publication is necessary to protect intellectual property, e.g. in the case of delaying publication until a related patent submission is complete.




Ref. 1: