Add background color in header of mobile app?

I’ve been researching (and downloading) iPhone apps for UX inspiration.

Most retailer and productivity apps I’ve downloaded have a header area with some search textbox and a few filters.

I’ve noticed that some of these apps have a background color while others don’t.

For example, amazon, walmart, microsoft outlook and onedrive add color to the header.

Apps like ebay, google calendar, youtube, gasbuddy, instacart, airbnb, zillow use a white background.

Is there some type of logic behind this?