Petaloid sepals serve the function of attracting pollinators to a flower.
In many plants, the sepals look similar to petals and are brightly colored to catch the attention of insects, birds, bats or other animals. These animals are attracted to the flower for the nectar or pollen that it provides, and in the process, they help to pollinate the flower, which is essential for the plant to produce seeds and reproduce.
So, the petaloid sepals help the flower to attract pollinators and ensure its survival.