Only get it when
– you'll read it at least 5 times.
– it's a reference book you'll use a lot.
– you need it under a time constraint (i.e. now) or must have it longer than the loan period at the library.
– you're planning to damage it during use (e.g. flour-filled baking books, workbooks, bathtub reading material).
– you plan to donate it to the library.
– to support the author.
Otherwise, use the library!