That's orthogonal. If the type was `&[u8]` instead of `Path` the type signature would be:
pub fn read<P: AsRef<[u8]>>(path: P) -> Result<Vec<u8>>
The reasons for it to be generic and us `AsRef` remain. The reason for Path over &[u8] is, AFAIK, because not all byte slices are valid paths on all OSs, but also because a dedicated type lets the standard library add methods such as `Path::join`