Good question, after a few minutes testing, I found DirectX don't care the FVF_FORMAT definition order, it only care the order of your vertex struct, so the following two lines get the same result.
VertexFormat FVF_FORMAT = VertexFormat.Position | VertexFormat.Diffuse;
VertexFormat FVF_FORMAT = VertexFormat.Diffuse | VertexFormat.Position;
Internally, D3DFVF_XYZ was defined before D3DFVF_Diffuse as below(d3d9types.h), so both above two lines will get a value of 0x42. When DirectX process the vertex, it may use bit-wise operation such as &. for example, 0x42(hex) = 01000010(bin), first test with D3D_FVF_XYZ
(0x42 & 0x002) != 0, this bit was set, so D3DFVF_XYZ was present! fetch some data from vertex buffer as vertex position. the same logic will apply to other macros.
#define D3DFVF_XYZ 0x002
#define D3DFVF_XYZRHW 0x004
#define D3DFVF_XYZB1 0x006
#define D3DFVF_XYZB2 0x008
#define D3DFVF_XYZB3 0x00a
#define D3DFVF_XYZB4 0x00c
#define D3DFVF_XYZB5 0x00e
#define D3DFVF_XYZW 0x4002
#define D3DFVF_NORMAL 0x010
#define D3DFVF_PSIZE 0x020
#define D3DFVF_DIFFUSE 0x040
This means you must define the Vertex in following order, first position, and then diffuse(the order depends on the macro definitions above).this is also true when you fill in data of your vertex buffer.
NOTE: The above conclusion was based on my test, and I didn't find any documents say this, you can also test your own code to see whether this is true.