If life is all about this earth it doesn't make sense. But if this is a small part of an eternal journey and God is more concerned with our souls, its easier to accept. Also there is evil always opposing good. Some say this evil is an outside spiritual force like the devil. Others believe it's within us.
God allowed the ultimate bad thing to happen with Jesus crucified but that act was also the source of our redemption. Remember what Jesus said. "In this world you will always have trouble. But take heart. I have overcome the world. "
As you say we live by faith.