While most people tend to get on well with a lot of other people in their social grouping(s), not all social groupings get on well with eachother, and within social groupings, there are a few people who don't get on with other people, there are also those who are shunned by many people - not because of what they've done, but because other people may perceive them as what we call 'weird'.
But first, we must define what constitutes a weirdo. One could say it's people who don't fit into social norms. And for that, we have to decide what is 'normal'. In this case, weirdness would be people who don't fit into the larger definition of normalcy, where normalcy is defined by long-established social traditions. Unlike other types of discrimination, the weirdness of a weirdo is discriminated against purely on perceived behaviour patterns - even if they've not done any harm to anyone.
There are some weirdos have done well in life - be it become very rich or otherwise successful. Often, these people are called 'eccentrics' instead of 'weirdos'. An example of this is Elon Musk who's behaviour is often considered unorthodox, but has become successful, is perceived as an innovator and has achieved a lot. However, there is no universal one-size-fits all metric for success that is purely objective, so we will henceforth refer to eccentrics and other types of weirdos as just weirdos.
This discrimination of weirdos could be a behaviour pattern that is a hold-over from prehistoric times when life was mostly about survival. Maybe it's still hard-coded in our brains, or maybe it's subconsciously been passed down many generations to our present time. Anyone who did not contribute to the well-being of a tribe of early hunter-gatherers would be considered a dead-weight (someone who uses the resources of the tribe without contributing) and likely be ostracised. As well as just being lazy or weak, anyone who was engaged in an activity that had no obvious value to the tribe's survival would be frowned upon. While doing it just a few times (while still making some useful contribution) might be frowned upon, the fear of ostracism (which is a deep-rooted fear that many humans have) might encourage the person to abandon these activities. Examples of such behaviour could be anything from arranging stones into a pattern to more elaborate things such as cave art. Maybe the cave artists would have been considered some of the earliest weirdos. There has been evidence of cave-art going back tens and thousands of years, but in this very long timespan, not only are there relatively few surviving artworks, but also there was not much innovation with the art-styles. One hypothesis could be that these early artists were considered weirdos, and other members of the tribe who tried to imitate the artist's art were made fun of (thus placing a stigma on any cave-artist), so when the artist died, they had little opportunity to pass on their knowledge and the skill died with them. This might mean that cave-art may have independently sprang up many times but died out pretty quickly. It was only after the last ice-age and development of agriculture that early humans could place less emphasis on agriculture, and therefore indulging in art was no longer considered to be such a 'waste of time/resources', and this was when art started to develop beyond the critical mass where enough people didn't see being an artist as being a weirdo, and thus there were more people to encourage eachother and share techniques.
Despite today's world of technological marvels, humans are still instinctively prioritising their own survival. Humans are by nature a social species and are longing to be part of some greater society. We can say "Humans are weak, society is strong". and to ensure the best chance of survival, it is best to pick strong friends because we as individuals are weak, and stronger friends will be better at survival and help ensure your own survival.
But are weirdos really dangerous? One trait of weirdos is that they can behave unpredictably - or at least their behaviour patterns don't fit someone's model of certain classes of behaviours associated with certain observed traits of the weirdo. This unpredictable behaviour might make someone appear to be less trustworthy. This could be why some people may not feel at ease with a weirdo even if they haven’t shown any hostile intent. But other types of weirdness could also feel dangerous. Is it the fear of the unknown? Again, there are countless examples of how people have behaved very negatively towards that which they do not comprehend. An example of this was when the first hydrogen balloon was released in Paris in 1783. It was an unmanned balloon (called a "Charlière"), and was followed by horseback riders for 45 minutes until it landed in the village of Gonesse. When it landed, the local peasants became terrified and their instinct was to attack it with pitchforks. Not once did they consider that this was a scientific endeavour and that they were destroying progress – their behaviour was driven by the fear of the unknown. Understanding what drives this instinct could be key to understanding deep-rooted behaviour patterns and by extension problems with society.
People can also have physical traits that can be considered weird. These could be genetic mutations such as having an extra finger. While having an extra finger could make someone more dexterous, it could also be a sign of inbreeding (which is seen as weakness) and maybe humans are instinctively put off from risking passing on this person's inbred DNA to the tribe. But behaviour patterns are mostly psychological, but even so, they might produce the same reaction. This could be something like not being good at socialising.
There have been many examples throughout history of both individuals and society ostracising those who they consider undesirable - the weak, useless, or people considered weird. On a large scale, it takes the form of persecution, and on a smaller scale, this manifests in bullying. This is another behaviour pattern that is irrational when our survival is often taken for granted but is a holdover from how humans behaved when survival was a greater focus of existence. The bullying could come in either physical or psychological forms. Physical bullying relies purely on strength, so it's disadvantageous to the weak. Psychological bullying targets people with less developed social skills, which is a trait of weirdos. Unlike physical bullying which is meant to frighten someone away, psychological bullying has the effect of hammering someone's behaviour to fit a behaviour pattern that is imposed on them. Even if someone is physically strong, they can still be a pacifist who will not use violence to ward off the bullying, and in this case, their lack of desire to use violence to defend themselves might also be considered a weakness.
While being an artist has become more acceptable over the millennia (as long as the art isn't considered too 'weird' (and even then, there's a sizeable network of people who can still see it as art and not just weirdness)), when seeking out weird traits, we may nowadays focus on traits that negatively impact the individual, such as a poor ability to socialise. In fact there are now multiple categories of things that may be considered weird. There's the 'interesting' type of weird, where people do things out of the ordinary in a positive way - whether they be artists or innovators who think outside the box. Then there's the 'feel sorry for' weirdness that thanks to the de-prioritization of survival, people are now able to take pity on certain people who are deficient in certain skills (usually social skills), and there's the weirdness that brings shame to the weirdo. For the 'shame' type, this manifests itself in behaviour that can be detrimental or even dangerous to other individuals, although prejudiced people can perceive people to be shameful weirdos if they behave in ways that do not align to their prejudices. It is because of the existence of these prejudiced people that things such as racism or anti-LGBTQIA+ discrimination exist.
One thing that weirdos have in common with geniuses is that they have the ability to see outside of the box. While a weirdo's view may not necessarily be as large as a genius's view, the genius can not only see what everyone else can see (in most cases), but can see outside of these limits, which includes seeing into the domain of certain weirdos. Geniuses are sometimes considered eccentric (a successful weirdo), so they can more easily relate to weirdos. In fact, shaming weirdos cuts out opportunities for weirdos to grow. If a weirdo is not able to be experimental with what they do, things remain static, and not only are they less likely to develop their weirdness, but less likely to venture in to the realm of 'normalcy'.
Overall, society at large has tended to support the current trends and not the weirdos, but nowadays, weird things are getting trendier. In fact, it is only recently that diversity is being celebrated by the society at large. The LGBTQIA+ community is now largely considered mainstream, and people are less likely to be put off by art that is considered too 'weird'. Even fairly recently, it often used to be the case that the instinctive reaction towards art that was considered too weird (e.g. surrealist) was that the artist was taking drugs (this is an example of someone trying to shoe-horn something into their worldview), but even that type of prejudice is dying out. Was this just an attempt for prejudiced people to shoe-horn what they perceive into their limited worldview?
Nowadays, people are also being exposed to 'weirdness in general' thanks to some of the stranger things you'd find on the Internet which you wouldn't (until very recently) find in a magazine, book or newspaper that is filtered by editors who used to hold a grim view towards weirdness. In fact, thanks to the Internet, it is easier to find likeminded people (in fact, you can even deliberately be your own flavour of 'weird' to find just the right people), and thus find your own 'tribe'. While this may feel empowering to many, there is a risk that people could end up living inside a bubble and not having much awareness of what goes on outside it, thus re-igniting old prejudices or even creating completely new ones. These days, there is more acceptance of weirdos and weirdness (in fact, people have gone so far as to appropriate the term 'weirdo' as a term of endearment for people who think outside the box), and many ongoing cultural paradigm shifts are being driven by greater acceptance of weirdness, but work still needs to be done.
For many of us, we have moved so far away from the survivalist mindset that instead of letting fear dominate our lives, we're switching to hope. It is as if nowadays, instead of finding tribes to join for the purpose of survival, we're focusing on finding tribes for the purpose of thriving. This generates diversity, but unless we venture outside our bubbles and reap the fruits of diversity, we may still be at risk of falling into the old traps of prejudice if we're not careful.