Main to sub panel feed
If the wire is sized for a 70 amp run, then the breaker in the subpanel could be any size that size or lower.  A lower rating will protect that circuit better if you don't anticipate the need for that qty of current, but can be swapped out quickly if increasing size is needed.  However, depending on the distance traveled, the difference between the breaker sizes might be preferred to prevent nuisance tripping (if both were 40 amp breakers and you were getting close to the overall limit, then the inside breaker would likely trip before the outside due to the wire line load to feed the building itself.