The logic behind Bug being x2 against Psychic is thus:
The Psychic type is based on the mind, and the mind has irrational fears, namely the dark, ghosts and bugs. That's why Psychic types are weak against those, but have a resistance to Fighting, because of the old "mind over substance" idea.
The logic behind Bug being x2 against Dark is thus:
Since most bugs are active at night, under the cover of darkness, they thrive in places in places that have little to no light, e.g. woodlice live in dark, dank places, usually under fallen trees. Hence why Fire is x2 against Bug because many real life species need to be in moist soil most of the time, ergo why bugs have a ground resistance.
This is mostly fan based logic though, but imo it makes sense.