Starship, for the unaware, is quite an ambitious project. In the future, SpaceX plans to use Starship to transport satellites, goods, and even people throughout Low Earth Orbit and to the International Space Station. Some day, CEO Elon Musk & co. may use similar ships to transport humans to Mars.
During the test flights, Starship will launch roughly 12.5 miles into the air before settling down for a landing. If all goes well, further, more strenuous tests will likely be conducted, and Starship will be well on the way to performing its first commercial flights in the next few years.
Until that time, though, SpaceX has a lot of ground to cover. Unexpected problems are common in the space industry, and SpaceX will want to ensure its latest spacecrafts are as stable as they can possibly be before the company begins ferrying precious cargo (including humans) to and from Earth.
That's where test flights come in -- even if they fail in some way (preferably in non-explosive fashion), the company's engineers still learn valuable information about a given craft's limits and capabilities. Any flaws discovered during a launch failure can then be tweaked for the next test.