This is from seeking validation and attention from others, also a lack of understanding of oneself. When people feel misunderstood by others around them they will feel lonely but when a person is determined to understand themselves there is no attention or validation from someone else that will make a difference in ones own understanding of themselves. This question alone shows investment in others more than oneself. There is self neglect to a degree.
The desire to be understood by others causes this. If the sufferer of this sadness understood themselves further, this sadness would not last. This is based on feeling, not truth.
If one understood themselves enough they would know why this sadness is there and this awareness will dissolve the sadness. Because of this lack of understanding of oneself there is wonder why this feeling is there.
🙏