Not necessarily! I think it's good that they encouraged you to apply. It's probably not said to just anyone!
My PI is on sabbatical next year so she told me straightforward not to apply to her school, as she's one of the only two MedAnthro people here and the other professor's interests don't align with mine. She told me to ask the program director to confirm with my interests, and I got a very clear answer again suggesting me to apply elsewhere. I definitely appreciated it. Saved me tons of work. Sad though that I won't be continuing here.
At another top school I was considering also gave me a very clear response. The professor I'm hoping to work with is no longer taking any new phds. He sent me a list of his colleagues from a few different depts that he thought might be related to my area. I eventually decided not to apply to this school.
I'd say take their recommendation to apply as a good sign!