If you want a Biblical explanation ,,,, God created the animals (including the dinosaurs) within those 6 days. So yes , the T-Rex would have been alive with Cain and Abel.As far as "Why wouldnt the T-Rex kill the people ? " , God put a fear of humans in animals.:|