You can use this awk
:
$ awk 'BEGIN{OFS="|"} /^header/ {h=$0; next} {print h, $0}' file
header-1 header-sub1|field1|field2|field3|field4
header-1 header-sub1|field5|field6|field7|field8
header-2|field9|field0|fieldA|fieldB
Explanation
BEGIN{OFS="|"}
set the output field separator as|
./^header/ {h=$0; next}
if the line starts withheader
, then store it without printing.{print h, $0}
on the rest of the lines, print the stored header first.