Most of the time, hydroceles in adult men are caused by injury.
They can also be linked to having a hydrocele at birth, which isn't unusual - https://www.healthline.com/health/hydrocele
They are not caused by an STD.
Since you seem to be suffering, have they talked about surgery? Also, they typically resolve themselves in about 6 months. Perhaps it's time for a second opinion.