That is just a d@mned stupid way to code that function call. The most fundamental problem with the expression as used:
digitalWrite(dataPin, !!(val & (1 << i)));
is that the second argument to digitalWrite is NOT a boolean, it is an integer!
HIGH and LOW are defined in Arduino.h as:
#define HIGH 0x1
#define LOW 0x0
So, while that expression may work now, if the definitions of HIGH, LOW, TRUE or FALSE are ever changed, this code may well break. TRUE could just as well be defined as 0xffff, instead of 1. MOST code would not care about this change, but the code in question would no longer work as expected, and could prove difficult to debug, especially for newbies.
The whole point of defining constants like HIGH and LOW is so you will NOT use explicit numeric values in your code, but rather use the symbolic values. This allows the set of options to be re-defined or expanded in the future, without breaking code written before the change was made.
Some programmers seem to think using clever tricks like that makes them look smart. I believe it does exactly the opposite. More often than not, it makes them the authors of many very clever, and very hard to correct, bugs. I’ve been doing Engineering, and Engineering management for over 35 years, and I’ve always said: “A single very smart, but un-disciplined, engineer can do FAR more damage than a whole building full of very average, but disciplined, engineers”.