This is Salapunku, the first ruin you’ll see on the first day of a 4-day Inca Trail trek.
It was located next to a canal, so may have been involved in administering water from it. Otherwise, from what I can uncover, it was just a little Inca farm town.
It now overlooks the rail line to Aguas Calientes / Machu Picchu Pueblo — so any local ghosts don’t get much rest these days.