Edgar Allen Poe was a master of the literary art. His use of symbolism is quite intentional, and nearly all of his stories are an allegory of some sort. "The Gold Bug" and "The Black Cat" are allegories of journeys, one into fulfillment and health, the other into madness and death.
The story of "The Gold Bug" is one of a treasure hunt told backwards. The reader, seeing through the eyes of the unnamed doctor, assumes he is on a wild goose chase with a madman, only to see him produce a treasure of gold seemingly out of nothing. Only once we have seen enough to believe are we told how he came about the realization that the treasure even existed in the first place.
The bug itself is symbolic of the find that makes a person believe that a fortune is nearby. In normal life it could be a rise in the stock market, the illness of a rich relative, or a real estate developer that wants to buy your land. The bug is not is not something of the person, like an invention, publication, or academic degree. Rather it is an opportunity that is open to anyone, but has been found by the holder. This creates a hurried but secretive obsession to turn the promise into reality.
It is interesting that only Legrand was "bitten" by the bug. This is an allegory to show that only he understood the significance of the map. Jupiter did not wish to be bitten by the bug out of fear. He did not want to look for the opportunity. Jupiter berated himself after they found the chest that he had not been willing to understand the bug. He was a man truly afraid of success.
As for the doctor, he is framed in the place of a scientist who can logically evaluate the situation, but has the curiosity to pursue the unknown anyway. He says all along that he is just going on the treasure hunt to humor his friend, but when they start digging he is getting excited as well. The doctor is the idle reader who does not expect anything to come of a venture into the w...