I read that some sharks are ovoviviparous. What advantages and disadvantages are provided by this type of reproduction as opposed to egg laying and live birth?
Reading this website (www.sharks-world.com/shark_reproduction) it seems that for most sharks the eggs develop inside the mother (ovoviviparity), and the young sharks ("pups") are born fully functional, but this is not true for all sharks (as you mention in your question).
This persons blog (morgana249/modern reptiles give birth to live young) discusses evolution of ovoviviparity in some reptiles, but not others. In some species this seems to have gone back and forth in their evolutionary history, which suggests that changing conditions favour one then the other at different times, possibly influenced by temperature, among other things.
The researchers stated, "These results suggest that parity mode is a labile trait that shifts frequently in response to ecological conditions."
This could be similar for sharks, although I could not find an article postulating this.
Alternatively, this could be because the mother does no "parenting"; the pups are immediately independent. Because sharks do not have many eggs at a time (according to the sharks-world website) each individual egg/pup has a higher "value" than each individual offspring in other fish species, which often lay many hundreds of eggs at once outside their body (oviparity). Therefore sharks that evolved this trait may have been selected because the offspring are more likely to survive if they are protected until fully functional within the parent.
No doubt there are other possible explanations, but as with all these questions along the lines of "What are the evolutionary reasons..." we cannot ever actually know, only suggest.