A failure can happen any time. Heat is the big enemy of shutters, as is shock and vibration. The life is likely calculated by a reliability engineer. They look at the component count, and if info is available for similar designs. Occasionally, things have lasted as long as they predicted.
When buying used, you can't know the actual history, so you have to go by the seller, and why he is selling it. A camera that is frequently carried in a car trunk would be one I'd stay away from, for example. The high temperature on a sunny day will wear out things much more quickly that at say 80 degree.