Trade secrets don't protect against reverse engineering or simply copying behavior. Historically, one of the rationalizations of patents was to encourage disclosure, but the exact wording, at least in the US constitution, gives no specific reasons.
"The Congress shall have power ... To promote the progress of science and useful arts, by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries;"