Samuel Straface thought he was the last one out the door one recent evening at the medical-technology startup he leads in suburban Boston.

But as he passed a glass-walled conference room on the second floor, Dr. Straface says he saw a man he didn’t recognize, sitting by himself in front of two open laptops and a tablet device. He continued walking a few steps toward the exit, but then, feeling uneasy, he turned back.

The...