Why did they put glass in gold jewelry? Isn't it a worthless material? Why would it be used in fine gold?
Glass was used by many fine jewelry makers. It is not uncommon at all to find glass in gold.
Glass has always been an admired material for jewelry. It has been used in gold for thousands of years.

Ancient Egyptian glass and gold necklace
c.1340-1320 BC
The British Museum
Glass in gold has always been prevalent, but fluoroshed during the Georgian Era, late 18th-early 19th century CE, when glass paste became very popular

Georgian black dot glass paste ring in 10k gold
c. 1820
Glass was used in jewelry for visual interest, as a lot could be done with it that couldn't be done with gemstones.

14k white gold camphor glass art deco necklace
c.1930s
Photo courtesy of Badis Jewelers
Renè Lalique is one of the of the most celebrated jewelry designers in history. He understood that the beauty of glass belonged with precious metals and gems. Here are a few of many, many glass and gold pieces he made

Palmettes Emeraudes Et Perles necklace and earrings
By Rene Lalique c.1905
Glass panels in 18k gold surrounded by enamel, pearls, and emeralds

Medusa Florale ring
By Renè Lalique c.1900
18k gold, glass, and enamel

Fleurs En Spirale brooch
By Renè Lalique c.1895
18k gold, glass flowers, diamond, enamel
Glass was also an affordable alternative to more expensive gemstones, which is why it's found so often during Depression-era art deco jewelry

10k gold Ostby Barton uranium glass ring
c.1930s
I have personally taken the seriousness of glass in fine metal one step further by setting it in platinum

1930s art deco platinum ring. The mount has 18 diamonds both Old European and mine cut, VS1 clarity and G-H color, as well as 6 natural sapphire accents. It needed a prong repaired and has been set with a 2 carat princess cut sapphire uranium glass gem. This ring is an heirloom of the Schwinn bicycle family.