The Purpose:

On mobile display, every pixel counts. To minimize the space required to display the search form, it is displayed in a compact form and then expand to full width on :focus. This way more space can be used for other interface elements or content area.

Check out the extended article over at http://webdesignerwall.com