Matilda isn't a true story at all. It's a work of fiction that takes us into a imaginative world crafted by the writer for our enjoyment and inspiration.
In the story, lavender and lilies could be symbols of the ghost's past life or attachment. Maybe the ghost had a special connection to these flowers when it was alive, like a gardener who loved to grow them or a bride who carried lilies on her wedding day.