How did technology evolve this way and why?
The first step in digital electronics was the [flip-flop](https://en.wikipedia.org/wiki/Flip-flop_(electronics)), at around 1919. A flip-flop is a circuit with two stable states (which can be thought of as 0 or 1).
Why is digital a good thing?
Let's start with what analog is. Analog means an electronic circuit deals with a continuously variable signal. You have values that are continuous, this means you can get any possible value within the operating parameters. Say, you have some value that can range from 0 to 10. That means you can get ANYTHING, 0.0001 is just as acceptable as 8.000011 or 9.9998376...
What if there is some noise (random disturbances or variations)? Yeah, that complicates things. Signal can degrade when it is transmitted over large distances (or if there is something messing with it), copying it can also add some more variation. There are ways to handle all those things, but this implies more complications and expenses, and you might run into cases where you just can't work within some parameters...
What is digital? Digital means you deal with fixed, discrete states. That means you could exclusively work with, say, 0,1,2 and 3. No 2.5, no 1.12244 rubbish. Everything has to be just one of those states.
Digital circuits represent signals by using bands instead of continuous ranges. All values within a band are considered equal, so that you only work with the desired discrete values. In practical terms, you can say anything from 0 to 4 is considered a 0, and anything from 6 to 10 is considered a 1. What about 4-6? Well, you do all you can to avoid those and keep things simple and predictable. It's MUCH easier to deal with that kind of tolerance than with smaller values.
Digital simplifies working in a precise and organized way. You can apply crafty algorithms to check if messages were transferred properly, you can make infinite copies of things without being concerned about errors. In many ways, you have much less to worry...
Digital can have some issues, too, but it makes things easier.
For more detailed information, see: