All those great men continued living with faith until they died. Those men did not get the things that God promised his people. The men only saw those things coming far in the future and were glad. Those men accepted the fact that they were like visitors and strangers on earth.
But those men were waiting for a better country--a heavenly country. So God is not ashamed to be called their God. And God has prepared a city for those men.