[verb (dictionary form)] + べくして + [same verb た-form]
べくして says an outcome was bound to happen: the reasons were there all along, and anyone looking could have seen it coming. It follows the dictionary form of a verb, and the same verb comes straight after it, usually in the past. It is written and formal; in conversation the same verdict is とうぜん当然だ, "it was only natural".
The outcome can be good or bad. With a failure, べくして puts the blame on what led up to it. With する verbs both するべくして and the more written すべくして occur.
The second verb is in the past because you are judging something that has already happened. A general truth keeps the present: じこ事故はおこる起こるべくしておこる起こる, "accidents happen for a reason".