Treadmills are better than running and walking in many ways. You don't get to go outside into nature, but you also don't have to worry about bad weather or other dangers that come with going outside, like cars and other people. It's much easier to relax when you don't have to worry about problems and can just focus on your running.
Besides that, though, there are a lot of more important benefits. The ground stays at the same level the whole time, so you don't have to change how you run. Instead, you can pick up a good pace and keep going. Also, the run is always at the speed you're most comfortable with, and you can change it whenever you want. But if you do want to run uphill, you can do that too by changing how steep the machine is.
Another benefit is that you can keep track of a lot of information about your running. Since the machine sets the pace of the run, it can automatically figure out things like how many calories you've burned. When you run, you can also hook yourself up to different monitors, such as heart rate monitors, breathing monitors, and so on, to check your health in many different ways.
One of the best things about running inside is that you don't have to be bored while you're doing it. You can watch TV or read a book. Even though walking on a treadmill can be very relaxing, it is still a better way to get in shape than some more complicated cardiovascular exercises. If I had to choose between getting into all kinds of weird positions and twisting my body into weird shapes or just running on a treadmill, I know which one I'd choose.