"..solely as necessary for Cloud Foundry to provide the Service..." is the key point, there.
But yes, it would also give them the right to change things as necessary to run the service. It could cover installing additional plugins like Heroku does, or munging config files, or even doing things like partially compiling source to some target.
By default, they really don't have the legal right to do a bunch of those things. Some of them are vague and arguable since hosting doesn't exactly fit into copyright law all the time, so companies will sometimes put in clauses like this that explicitly grant them rights that might otherwise seem like common sense. It may be obvious to you and me, but it's now spelled out in an agreement "just in case".
It appears they're gaining the authorization required to run your app.
From their terms of service:
b. Your Applications and Code. If You create online applications or program code using the Service, You authorize Cloud Foundry to host, copy, transmit, display and adapt such applications and program code, solely as necessary for Cloud Foundry to provide the Service in accordance with this Agreement. Subject to the above, Cloud Foundry acquires no right, title or interest from You or Your licensors under this Agreement in or to such applications or program code, including any intellectual property rights therein.
...and yet somehow you own exclusive rights to the data.