Elections may not be a really good way for us to pick our leaders, but they are better than any other way that we have of selecting them.
The major drawback of elections is that they do not always pick the people who will be best at the job of governing us. They do a good job of picking the person that the people like best, or the person who has the best organization for getting out the vote, but they do not necessarily pick the person who will be the best leader for the country. This can end up causing us to have leaders who are good at campaigning but not good at leading.
However, there is no better way to do this. Let us imagine that we thought we could do better by having experts pick the person who is most qualified to lead. The problem then would be that we would be ruled by the whims of these experts. This would not be very democratic and it might not even be any better. After all, experts are very capable of making mistakes as well.
So, elections are not the perfect way to pick our leaders, but they seem to be the least bad way to do so.