Yes. Novels that try to reach you something, or showcase a philosophy, have a name: propaganda.

Novels are not supposed to be that. They are supposed to be empathy machines. Put you in a different time and place, in the shoes of others.

You take from that whatever you take.