So, if D65 does not change anything then why does the matrix change?
When you build an RGB color space, you have to fix :
red,green,blue primaries,white point and a transform to go from/to linear RGB values and nonlinear RGB values (this is what is named "gamma" encoding, as many color spaces use a power nonlinear function, power=gamma).
Starting from this set of values, you can define how to go to/from XYZ.
CIE_XYZ is the mother of any color space.
If you change the white reference, the matrices reflect this change.
This is the reason you cannot change white reference without adaptation when you convert from a color space to a different color space with a different white point.
The matrices to/from XYZ are white reference dependents.
The same is true for Lab. You have to fix a white reference.
ICC fixed D50 as white reference for PCS (Profile Connection Space, XYZ or Lab).
Why not use Prophoto RGB (D65)? It can have all of Adobe RGB (D65) contained within
.
No difference all adobe RGB colors are contained in ProPhoto (D50 white reference).
David Coffin dcraw can output data in ProPhoto (D65). I don't investigate the reason, may be it was more simple. But there is no any difference in color management results.
Jacopo