In Vyasa’s samadhi, he saw jiva, jiva’s conditioning, Maya, and Krishna. He also saw the solution, which is only by Bhakti yoga that we can get out of this conditioning. He composed Bhagavatam after knowing this. We should know that he wrote this book to propagate Bhakti yoga. It is very dear to Vaishnava devotees.