I'm not exactly sure what document you are looking at that's saying this, but here's my guess at what they are getting at. An activity is a very flexible tool that can do a number of things. You pay for that flexibility with a bit of efficiency. If all you are trying to do is assign value X to property Y under condition Z, a declare expression can probably do that more efficiently, since it's not considering if it needs to loop, if it should conditionally skip the step or jump to a later step, it doesn't need to support calls to all of the various methods that an activity can call, etc. All of that requires java code be generated to support it and even if you aren't using it, there are if blocks to evaluate, properties to get from memory, and what have you. While that is probably a minimal performance hit for a single activity, one time, as your application grows, it can eventually add up, so avoiding that if possible is preferred.
That said, there are times an activity is the best tool for the job exactly because you need all that extra flexibility and you are willing to pay the tiny performance hit to get it. In that case, don't try and force a declare expression (or data transform, or collection, or, or...) because a document suggested you might want to use an alternative to an activity.
One of the great things about the Pega platform is that there are often a number of different ways to accomplish a business requirement. As you become more familiar with the tool set, you'll be able to pick and choose the one that best meets your needs and early on, you can always come here and ask for guidance.