It's basically half fat, quarter protein, quarter carbs. Salt can be added or not.
They use it fortified as 'plumpy nut' to feed undernourished children in the third world back to health. (See https://en.wikipedia.org/wiki/Plumpy%27nut )
But I am not aware of how peanut butter is sold in eg the US. I am going by the German and British market here.
So, yes, if you eat sugary stuff, it's gonna be not great for you. Agreed.
Peanuts mostly contain unsaturated fats. Peanut butter though might contain all sorts of other ingredients that are rich in saturated fats (like some plant oils).
The problem with salt is that in general Western diets already tend to use too much salt and too much salt can lead to an increase in blood pressure, which ultimately if untreated can lead to heart attacks and strokes.
It's mostly fat with lots of salt, which is a pretty good recipe for future cardiovascular disease if eaten excessively.