From wiki about Minions:
Minions are small, yellow creatures who have existed since the beginning of time, evolving from single-celled organisms into beings who exist only to serve history's most villainous masters
They are fiercely loyal to Gru and Dr. Nefario and extremely eager to please, willingly helping with any evil plans, but at the same time they are friendly and fun-loving. Despite being relatively simple-minded, they are capable of building weapons, operating those weapons, using computers, and even driving.
So after reading many materials I understood that Minions are created to be funny and extremely stupid. From the creators there is a quote that says
Seeing how dumb and stupid they often are, I just couldn’t imagine Minions being girls.
So they are created as cute, funny, dumb, stupid. Then why do they want to serve evil masters? I can't seem to be find any answer regarding this. Searched in many interviews in Youtube. But didn't find any explanation.
Even in the origin story inside the Minions movie there is no explanation why they want to serve vicious villains. Why not a good people?!
When Scarlet wanted to hurt Stuart, Bob & Kevin, even then they acted as loyal and went to tell her 'Sorry'. Is there any explanation from the authors and creators why they don't serve good people and serve/want only villains? This just doesn't add up with their characters.