Context is everything here. The first part of the context is who is speaking and to whom. Jesus, a Jew, is speaking to Jews. There was nothing more unclean to a Jew than a pig. The thought of giving anything of value to a pig was mind-boggling. The second part of the context was that Jesus either had already told or would tell the parable the Pearl of Great Price in which the Pearl was symbolic of salvation. Therefore placed in context, “cast not your pearls before swine” is basically (really rough paraphrase here) “don’t allow invincibly ignorant people to mock and blaspheme your most precious faith.”
Now taken out of that context, we see pigs rooting around for food and having no use for jewelry - food has value, jewelry is useless so pigs have chosen the better part and we should speak to them on their level. But this is dangerous, does that mean that when I try to evangelize druggies, whores and abortionists that I should try to find common ground with them? To these people, life has no value and we are offering them life - eternal, bought and paid for by Jesus’ blood
Two interesting but completely different takes on one line of Scripture.