One reason I can think of where you might want to use the setHeader method is
if you need to set an expiration date > 68.1 years future. The largest +(int) value allowed is 2147483647 or about 68.1 years.

Note that in either case cookies are sent back using HTTP headers. Therefore, you should add them to the response BEFORE you send any content back to the browser.