You'll often hear people say "you should never, ever build something if you can buy a solution instead" (where buy also includes using an open source package) - but there are actually a bunch of other things to consider:
- Is the solution you're considering well maintained and likely to keep working? Open source projects sometimes stop being updated. Vendors go out of business.
- What's your escape strategy if the vendor DOES go out of business, or massively increases their pricing?
- Integrating with a vendor / package is often a non-trivial amount of development work. Have you considered this relative to building your own, custom solution?
- Do you have specific requirements that go beyond what's available off-the-shelf?
It's absolutely true that your engineering efforts should be spent on the things that make your organization unique: time spent on your customer's problems is more valuable than time spent reinventing a wheel.
But sometimes, the available wheels really aren't fit for your purposes.
I've built when I should have bought, and I've bought when I should have built. Getting it right is hard! Often it doesn't become clear if you made the right decision until several years after you've made it.