כֹּ֤ל פָּעַ֣ל יְ֭הוָה לַֽמַּעֲנֵ֑הוּ וְגַם־רָ֝שָׁ֗ע לְי֣וֹם רָעָֽה׃
The LORD hath made every things for His own purpose, Yea, even the wicked for the day of evil.
Read kabbalistic (mystical) interpretation of Proverbs 16:4: and classical mystical sources.