The rules are different for each airline/hotel. With some, the names on the two accounts (Diners, airline/hotel) has to be the same. With others the names may be different. Sometimes the rules are not enforced.
With BA, a workaround is to form a "household account".