human
idk if preaching it automatically makes you more likely to do it but
things you judge and condemn, are parts of your own psyche that you haven't owned [which shadow work helps uncover and integrate]
a lot of times when people are preaching, they're judging and condemning
sometimes you may be just letting someone know (out of love), or be trying to spread awareness (out of love). this obv wouldn't be projection
i think if it comes from love and understanding, it wouldn't be a projection (just a side note)
edit: i just read "doing it secretly so" - yeah this would be a projection
what you've denied in yourself, comes often as a projection which often comes in the form of teaching/preaching/condemning. if there's a judgement that comes in the form of shame, attached to it, i want to be bold to say, it's a projection.
projections can be helpful, whenever i catch myself teaching or preaching, i immediately go, ahhh there's my lesson.
there's tons of books on this phenomena. if you look for something in shadow work you will deal with this
there's also something where when you strictly identify with a label, perhaps as good, smart, helpful, ambitious etc. the opposite can be your shadow. so if you say "i'm a good person", you sometimes have a shadow where you are the opposite.
it's cool stuff - i first learned this stuff from leo, he has very good knowledge on this subject i think. but i did my own self study and reading after this. this is one of my favorite topics
Gary vee has some good examples of what im saying here if ur familiar - like when Gary vee tells people you shouldn't care what people think and then one of his core motivation for business he says is to prove people wrong
Also gary vee preaches empathy, but in a lot of his helpings you can see he doesn't empathize and just gives advice
These come in the form of judgements/moralizing