It's probably because the dough wasn't chilled. Chilling the dough solidifies the butter and cream cheese. The longer these fats stay solid in the oven, the less spreading will occur during baking. For the perfect cookie, let the dough chill in the fridge overnight. If you’re in pinch for time let chill a minimum of 2 hours if you want a thicker cookie.