Facts
We all assume things. We all pre-judge. There isn't a single person that doesn't.
It's a safety mechanism.
Throughout our lives, we experience certain situations in which we associate to specific things, places, and yes - people. So because a person looks similar to another person, our mind is taught to associate person with person, and feeling with feeling.
It makes sense. When we see a person in a camouflage uniform, we associate that person with the military, and everything that "stereotypically" comes with it - self-discipline, hero, sacrifice, war, government. Similarly, when we see a person with a face-mask, a blood-stained apron, and a chainsaw, we'd probably take another route home.
Why It Works
The reason why it works is because characteristics often fall into "categories" of one another. For example, athletes generally share characteristics such as being tall, having broad shoulders, muscle-toned, having social skills, being disciplined, and some would argue there's even a specific way they tend to stand. Similarly, people of theatre often share characteristics as well. For example, they're generally more physically expressive, light-humored, easier to talk to, and with a more undeniably distinctive personality.
As such the case, it's common that for one characteristic to lead to another. For example, someone who is tall with broad shoulders may also be good at holding conversations or hosting presentations.
Dating
Onto specifics, let us approach the concept of dating. We all have that dream girl or dream guy, generally involving that perfect "body figure" and "personality". Most (not all) will "prefer" to have someone who isn't overweight, underweight, too tall, too short. Someone who is social, able to hold conversations, somewhat funny, and talks slightly about high dreams and ambitions.
Seems very generic and almost blunt, right? Well there's a reason for it. Physically, these are the characteristics that are mind biologically senses for in other people. In other words, the human mind will be attracted to people of healthy status and these characteristics often represent exactly that. As for being able to hold conversations, it typically shows that people who are able to communicate effectively are generally more successful in life than those who are not.
However, of course, we know that meeting someone that meets these "perfect" standards (and getting them to like you back) often isn't the case. In other words, highly improbable. But that's up for another discussion. No matter, whenever we meet people, we still access the same criteria and reflect on things that we perceive.
Presentation matters - that's a fact. As such it is only natural for us to make assumptions. For example, someone who doesn't have their hair combed or beard trimmed and wears a loose shirt with worn-out jeans and sneakers we often associate with bad hygiene and laziness because they didn't take the extra 15 minutes in the morning to look more presentable. Likewise, if we meet someone who frequently wears slacks or khakis and button up shirts (and maybe even a blazer) we often associate them with being busy, successful, and studious since they're either always on their way to a professional meeting or holding themselves to a higher standard of success.
As time proceeds, we often realize and come to the conclusion that we're generally right about our assumptions.
The Truth
So is it wrong for us to make assumptions without knowing fully the extent of our knowledge?
Absolutely not. Often times, these "assumptions" do end up working in our favor. Often times, we are correct. The gut feelings that tell us to avoid, or even walk towards - they protect us emotionally, physically, mentally, financially, and even timely. However, there is a disclaimer.
What If We're Wrong?
Well then we probably wouldn't want to make any harsh decisions beforehand.
Yes, we're often right about assumptions, most of the time. But that remaining 2% is very dangerous. As we take the extra precautions to maintain our own well being and safety, we should always keep this same standard of consideration for others in such, we never let our assumptions negatively affect the way we treat others. As argued by humanists everywhere, everyone deserves an equal chance. But yes, I understand this can get confusing and may be even hypocritical.
Conclusion
So here's it is:
It is okay to be make assumptions, but it is never okay to act unjustly upon them.
In more concrete terms, yeah you should probably avoid the guy with a chainsaw, but if he happens to ask you a unthreatening question, you probably shouldn't swing at him with a crowbar (assuming you had one). Who knows? Maybe he's trying a new form of art - a very questionable art.
So yes, it is okay to judge a book by it's cover. Maybe the title isn't clever or the artwork is faded, but don't throw away or destroy the book simply because it doesn't match your needs. Put the book back on the shelf that someday else, or rather someone else may read it.