I see entropy as a number that gives you an idea of how random an outcome will be based on the probability values of each of the possible outcomes in a situation.
Let's start with a simple case. Suppose only a single outcome is possible, then there is only one value of $i$ ($=1$) and $p_{1}=1$. From the formula, the entropy is then zero:
$$-p_{1} \log(p_{1}) = p_{1} \log \left(\frac{1}{p_{1}} \right) = 1 * 0 = 0$$
This is cool! When the outcome will be the same every single time, the "randomness" is zero, and so the entropy does indeed correspond to a measure of randomness.
Now, before moving to more complicated cases, let's look at a plot of the factors involved in the entropy formula. Let me rewrite the formula first as follows:
$$ - \sum_{i} p_{i} \log(p_{i}) = \sum_{i} p_{i} \log \left(\frac{1}{p_{i}} \right)$$

Looking at this plot you see that there is nothing really special about $\log \left( \frac{1}{p} \right)$, really any function of $p$ such that $f(1) = 0$ would have done the trick.
Now, you might wonder, what if I have two possible outcomes, one that is nearly certain and one that is very unlikely; for example $p_{1} = 0.999$ and $p_{2} = 0.001$. This case is tricky!
For the first outcome, we see that $p_{1} \log\left(\frac{1}{p_{1}} \right)$ is a number very close to zero. That first outcome is not too different from the single-outcome situation we looked at before.
For the second outcome, $p_{2} = 0.001$, let's think about the limit of the product $p\log(\frac{1}{p})$ as $p \rightarrow 0$. Intuitively, we know that if we add an extremely unlikely event, such as the one with $p_{2} = 0.001$, the "randomness" situation should not really be that different from our original single-outcome process.
Let's look at a graph to see what the definition of entropy does for us in this case:

Beautiful! This means that an extremely unlikely event contributes nearly zero to the entropy of the system. Extremely likely and extremely unlikely are similar in terms of their "randomness": they have pretty much none of it!
Why the logarithm?
At this point you might be wondering, what is so special about the logarithm? It does seem kind of an arbitrary choice. There certainly must be other functions of $p$ that have the same convergence properties as $p$ goes to $0$ and $p$ goes to $1$.
So, I'll give you a situation to think about. Suppose you have a system where there are two equally likely choices $1$ and $2$, with probabilities $p_{1} = p_{2} = \frac{1}{2}$. That situation will have some entropy, let's call it $S_{2}$. Consider also a second system with an entropy $S_{3}$ where there are three equally likely choices $A$, $B$ and $C$, with probabilities $p_{A} = p_{B} = p_{C} = \frac{1}{3}$.
It would be nice if the entropy were a function such that if I considered the union of the two independent systems, the resulting entropy of the global system would be additive, that is
$$ S_{g} = S_{2} + S_{3} $$
In simpler words, it would be nice for our measure of "randomness" to be additive.
Let's be explicit here and write down the full expression for $S_{g}$, assuming that the events from one system are completely independent from events in the other system.
\begin{align}
S_{g} = p_{1} p_{A} \log \left (\frac{1}{p_{1}p_{A}} \right) +
p_{1}p_{B} \log \left(\frac{1}{p_{1}p_{B}} \right) +
p_{1}p_{C} \log \left( \frac{1}{p_{1}p_{C}} \right) + \\
p_{2}p_{A} \log \left( \frac{1}{p_{2}p_{A}} \right) +
p_{2}p_{B} \log \left( \frac{1}{p_{2}p_{B}} \right) +
p_{2}p_{C} \log \left( \frac{1}{p_{2}p_{C}} \right)
\end{align}
The property of the logarithm that makes it a good choice for defining entropy is then more clear:
$$ \log \left( \frac{1}{p_{1}p_{A}} \right) = \log \left( \frac{1}{p_1} \right) + \log \left( \frac{1}{p_A} \right)$$
Given this property, we can simplify $S_{g}$ as
$$ S_{g} = p_{1}\log\left( \frac{1}{p_{1}} \right) (p_{A} + p_{B} + p_{C}) + p_{1} S_{3} + p_{2} \log \left( \frac{1}{p_{2}} \right) (p_{A} + p_{B} + p_{C}) + p_{2} S_{3} $$
$$ S_{g} = S_{2} (p_{A} + p_{B} + p_{C}) + S_{3} (p_{1} + p_{2}) $$
Since probabilities add up to $1$, this gives us the desired property:
$$ S_{g} = S_{2} + S_{3} $$
This culminates our motivation for why the formula for entropy is what it is!
Key takeaway
I will summarize by saying that the key point is that "randomness" is hard thing to quantify. We can choose a measure for "randomness" (such as Shannon's entropy formula), and that choice is only informed by the properties that we want the measure to have.
When you look at
$$ S = - \sum_{i} p_{i} \log(p_{i}) $$
for the first time in your life you might think: where on earth did they pull this out from? But it turns out that it was a definition only informed by the properties that it holds.
An informal enumeration of these properties is given below:
An extremely likely event should not contribute much to the randomness measure.
An extremely unlikely event should not contribute much to the randomness measure.
Randomness should be additive.