Green tea is initially cooked at high temperature to stop enzymes that oxidize leaves. This process is called kill-green.
Tea leaves are then rolled or crashed to break the fiber inside the leaves to extract moisture. Then, leaves are dried for storage.
At this point tea leaves are still very green and taste rather raw and plain.
Roasting add mildly nutty sweet taste to the tea.
Roasting in tea is much like toasting a slice of baked bread. Baking cooks the bread. Toasting add more pleasant finish to the slice of bread.
There are many styles of roasting (or sometimes called baking).
Roasting is often high temperature direct heating on a pan or wok. It adds strong nutty finish.
Baking typically involves tea oven. It’s very similar to an oven you find in your kitchen. It heats tea leaves more thoroughly and often used on higher quality teas.
There’s also bamboo basket roasting that send heat through bamboo basket. It has heat radiating through bamboo basket and tends to require more skills.
Each method adds slightly different flavor to the final tea. Some tea makers use combination of these techniques to bring deep flavor.
Roasting also helps extend shelf life of tea by lowering moisture content in tea leaves.
Unroasted tea is edible and some people prefer raw green taste, but many enjoy sweet nutty taste of roasted tea.